Browse Source

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

lcl 2 weeks ago
parent
commit
fe27f38553
1 changed files with 32 additions and 1 deletions
  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");