Ver Fonte

预发机申请成功,处理预扣款队列打日志

lcl há 1 ano atrás
pai
commit
9af27b1aa1
1 ficheiros alterados com 5 adições e 0 exclusões
  1. 5 0
      AppStart/Helper/PrePosWithholdService.cs

+ 5 - 0
AppStart/Helper/PrePosWithholdService.cs

@@ -121,6 +121,7 @@ namespace MySystem
                     string content = RedisDbconn.Instance.RPop<string>("PreWithholdQueue");
                     if(!string.IsNullOrEmpty(content))
                     {
+                        function.WriteLog("content:" + content, "每月统计押金达标情况");
                         JsonData jsonObj = JsonMapper.ToObject(content);
                         int UserId = int.Parse(function.CheckInt(jsonObj["UserId"].ToString()));
                         string SnNo = jsonObj["SnNo"].ToString();
@@ -130,7 +131,9 @@ namespace MySystem
                         ToChargeBackRecord back = db.ToChargeBackRecord.FirstOrDefault(m => m.UserId == UserId && m.Field1 == SnNo && m.Remark == "预发机超时未申请扣款");
                         if(back != null)
                         {
+                            function.WriteLog("预扣款数据:" + Newtonsoft.Json.JsonConvert.SerializeObject(back), "每月统计押金达标情况");
                             ChargeAmount = back.ChargeAmount;
+                            function.WriteLog("预扣款是否已扣:" + back.Status, "每月统计押金达标情况");
                             if(back.Status == 1)
                             {
                                 Utils.Instance.OpAccount(back.UserId, ChargeAmount, 134, false);
@@ -142,9 +145,11 @@ namespace MySystem
                         db.Dispose();
 
                         //减少账户预扣总额
+                        function.WriteLog("是否减少账户预扣总额:" + doBack, "每月统计押金达标情况");
                         if(doBack)
                         {
                             Utils.Instance.ToChargeAmount(UserId, -ChargeAmount);
+                            function.WriteLog("减少账户预扣总额:" + ChargeAmount, "每月统计押金达标情况");
                         }
 
                         Thread.Sleep(500);