Browse Source

统计交易和激活,加开关

lcl 1 year ago
parent
commit
8d03b7df16
2 changed files with 10 additions and 4 deletions
  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();
                 }