Browse Source

推送机具数据增加开关控制

lcl 10 months ago
parent
commit
c8cba0304b
1 changed files with 4 additions and 1 deletions
  1. 4 1
      AppStart/Helper/PosPushDataNewHelper.cs

+ 4 - 1
AppStart/Helper/PosPushDataNewHelper.cs

@@ -342,7 +342,10 @@ namespace MySystem
             Dictionary<string, object> data = new Dictionary<string, object>();
             data.Add("data_type", dataType);
             data.Add("data_content", dataContent);
-            RedisDbconn.Instance.AddList("KxsPosDataQueue", Newtonsoft.Json.JsonConvert.SerializeObject(data));
+            if(RedisDbconn.Instance.Get<string>("KxsPosDataQueueStatus") == "1")
+            {
+                RedisDbconn.Instance.AddList("KxsPosDataQueue", Newtonsoft.Json.JsonConvert.SerializeObject(data));
+            }
         }
 
         public static string getRequestId(int id, string type)