Explorar o código

设置金控手动设置押金队列

lcl hai 2 semanas
pai
achega
fe27f38553
Modificáronse 1 ficheiros con 32 adicións e 1 borrados
  1. 32 1
      AppStart/Helper/TmpService.cs

+ 32 - 1
AppStart/Helper/TmpService.cs

@@ -17,11 +17,42 @@ namespace MySystem
 
         public void Start()
         {
-            Thread th = new Thread(dosomething);
+            Thread th = new Thread(SetLkbDeposit);
             th.IsBackground = true;
             th.Start();
         }
 
+        private void SetLkbDeposit()
+        {
+            while (true)
+            {
+                try
+                {
+                    string content = RedisDbconn.Instance.RPop<string>("SetLkbDepositQueue");
+                    if (!string.IsNullOrEmpty(content))
+                    {
+                        string[] data = content.Split('|');
+                        PublicImportDataService.Instance.LkbSetDeposit(data[0], decimal.Parse(data[1]));
+                    }
+                    else
+                    {
+                        Thread.Sleep(2000);
+                    }
+                }
+                catch (Exception ex)
+                {
+                    function.WriteLog(DateTime.Now.ToString() + ":" + ex.ToString(), "商城订单余额支付异常");
+                    Thread.Sleep(2000);
+                }
+            }
+        }
+
+
+
+
+
+
+
         public void dosomething()
         {
             string content = function.ReadInstance("jk299.txt");