Browse Source

wifi解绑队列修复

lcl 3 months ago
parent
commit
bbd8cfc23a
1 changed files with 4 additions and 3 deletions
  1. 4 3
      AppStart/WifiUnBindHelper.cs

+ 4 - 3
AppStart/WifiUnBindHelper.cs

@@ -28,7 +28,7 @@ public class WifiUnBindHelper
         {
             try
             {
-                string content = RedisDbconn.Instance.RPop<string>("WifiUnBindHelper");
+                string content = RedisDbconn.Instance.RPop<string>("kxs_unbindwifi_list");
                 if(!string.IsNullOrEmpty(content))
                 {
                     DoSomething(content);
@@ -47,8 +47,9 @@ public class WifiUnBindHelper
 
     public void DoSomething(string content)
     {
-        JsonData jsonObj = JsonMapper.ToObject(content);
-        string posSn = jsonObj["pos_sn"].ToString();
+        string[] data = content.Split(new string[] { "#cut#" }, StringSplitOptions.None);
+        JsonData jsonObj = JsonMapper.ToObject(data[1]);
+        string posSn = jsonObj["posSn"].ToString();
         WebCMSEntities db = new WebCMSEntities();
         WifiTradeRecord edit = db.WifiTradeRecord.FirstOrDefault(m => m.SnNo == posSn);
         if(edit != null)