Explorar el Código

统计交易和激活,加开关

lcl hace 1 año
padre
commit
8d03b7df16
Se han modificado 2 ficheros con 10 adiciones y 4 borrados
  1. 5 2
      AppStart/Helper/StatService.cs
  2. 5 2
      AppStart/Helper/StatService2.cs

+ 5 - 2
AppStart/Helper/StatService.cs

@@ -31,7 +31,10 @@ namespace MySystem
         {
             while (true)
             {
-                StatTradeAmount();
+                if(RedisDbconn.Instance.Get<string>("StatServerStatus") == "1")
+                {
+                    StatTradeAmount();
+                }
                 Thread.Sleep(10000);
             }
         }
@@ -206,7 +209,7 @@ namespace MySystem
         {
             while (true)
             {
-                if(DateTime.Now.Hour >= 3)
+                if(DateTime.Now.Hour >= 3 && RedisDbconn.Instance.Get<string>("StatServerStatus") == "1")
                 {
                     StartPosActNumEverTime();
                 }

+ 5 - 2
AppStart/Helper/StatService2.cs

@@ -31,7 +31,10 @@ namespace MySystem
         {
             while (true)
             {
-                StatTradeAmount();
+                if(RedisDbconn.Instance.Get<string>("StatServerStatus") == "1")
+                {
+                    StatTradeAmount();
+                }
                 Thread.Sleep(10000);
             }
         }
@@ -205,7 +208,7 @@ namespace MySystem
         {
             while (true)
             {
-                if(DateTime.Now.Hour >= 3)
+                if(DateTime.Now.Hour >= 3 && RedisDbconn.Instance.Get<string>("StatServerStatus") == "1")
                 {
                     StartPosActNumEverTime();
                 }