From 14725e33b8edeaa2235e01792c0440d79a0d9b83 Mon Sep 17 00:00:00 2001
From: tangxu <tangxu76880903>
Date: 星期三, 29 五月 2024 14:37:18 +0800
Subject: [PATCH] 更正

---
 WebApi/Controllers/TotalWaterInController.cs |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/WebApi/Controllers/TotalWaterInController.cs b/WebApi/Controllers/TotalWaterInController.cs
index 40bb9ee..a234557 100644
--- a/WebApi/Controllers/TotalWaterInController.cs
+++ b/WebApi/Controllers/TotalWaterInController.cs
@@ -61,6 +61,8 @@
         [HttpGet]
         public IStation.Dto.ApiResult GetByDayDebug(string day)
         {
+            if (isDebug)
+                return new IStation.Dto.ApiResult() { Code = ApiResultCode.Error, Message = "Debug is Unacess " };
             if (day == null)
             {
                 return new IStation.Dto.ApiResult() { Code = ApiResultCode.Error, Message = "day null" };
@@ -87,6 +89,8 @@
         [HttpGet]
         public async Task<IStation.Dto.ApiResult> GetByDay(string day)
         {
+            if (isDebug)
+                return new IStation.Dto.ApiResult() { Code = ApiResultCode.Error, Message = "Debug is Unacess " };
             if (day == null)
             {
                 return new IStation.Dto.ApiResult() { Code = ApiResultCode.Error, Message = "day null" };
@@ -158,12 +162,13 @@
         [HttpGet]
         public async Task<IStation.Dto.ApiResult> GetLastDay3()
         {
+            if (isDebug)
+                return new IStation.Dto.ApiResult() { Code = ApiResultCode.Error, Message = "Debug is Unacess " };
             DateTime yest1 = DateTime.Today.AddDays(-1);
             var sum1 = TotalWaterInHelper.Read(yest1);
             if (sum1 < 0)
             {
                 sum1 = await ZyConnectHelper.GetTotalWaterByDay_In(yest1);//.GetAwaiter().GetResult();
-
                 TotalWaterInHelper.Save(yest1, sum1);
             }
 
@@ -172,7 +177,6 @@
             if (sum2 < 0)
             {
                 sum2 = await ZyConnectHelper.GetTotalWaterByDay_In(yest2);//.GetAwaiter().GetResult();
-
                 TotalWaterInHelper.Save(yest2, sum2);
             }
 

--
Gitblit v1.9.3