|
@@ -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");
|