Browse Source

预发机提前绑定提示推送
激活条件变更,划拨时间可以在绑定时间之后30分钟

lcl 1 year ago
parent
commit
fb51eb9768

+ 8 - 6
AppStart/Helper/SycnSpServer/SycnSpBindService.cs

@@ -129,12 +129,14 @@ namespace MySystem
                                     MachineData.UnBindCount -= 1;
                                     db.SaveChanges();
 
-                                    // if(pos.BuyUserId == 0 && pos.PreUserId > 0)
-                                    // {
-                                    //     RedisDbconn.Instance.Set("CheckUserBindPrePos:" + pos.PreUserId, "您的名下有已绑定的预发机 sn:" + pos.PosSn + " 尚未申请,绑定30分钟内申请即可免费自动补录,请前往客小爽产品中点击机具申请继续完成申请");
-                                    //     int ExpireTime = 60 * 25;
-                                    //     RedisDbconn.Instance.SetExpire("CheckUserBindPrePos:" + pos.PreUserId, ExpireTime);
-                                    // }
+                                    if(pos.BuyUserId == 0 && pos.PreUserId > 0)
+                                    {
+                                        // RedisDbconn.Instance.Set("CheckUserBindPrePos:" + pos.PreUserId, "您的名下有已绑定的预发机 sn:" + pos.PosSn + " 尚未申请,绑定30分钟内申请即可免费自动补录,请前往客小爽产品中点击机具申请继续完成申请");
+
+                                        RedisDbconn.Instance.AddList("CheckUserBindPrePos:" + pos.PreUserId, pos.PosSn);
+                                        int ExpireTime = 60 * 25;
+                                        RedisDbconn.Instance.SetExpire("CheckUserBindPrePos:" + pos.PreUserId, ExpireTime);
+                                    }
                                 }
                             }
                             tran.Commit();

+ 2 - 2
AppStart/Helper/SycnSpServer/SycnSpTradeService.cs

@@ -328,8 +328,8 @@ namespace MySystem
                                         }
                                         //判断激活条件并激活
                                         DateTime TransferTime = pos.TransferTime == null ? DateTime.Now : pos.TransferTime.Value;
-                                        // if (pos.CreditTrade >= CheckMoney && pos.ActivationState == 0 && TransferTime.AddMinutes(-30) < pos.BindingTime && pos.BindingTime > DateTime.Now.AddDays(-CheckDays))
-                                        if (pos.CreditTrade >= CheckMoney && pos.ActivationState == 0 && TransferTime < pos.BindingTime && pos.BindingTime > DateTime.Now.AddDays(-CheckDays))
+                                        if (pos.CreditTrade >= CheckMoney && pos.ActivationState == 0 && TransferTime.AddMinutes(-30) < pos.BindingTime && pos.BindingTime > DateTime.Now.AddDays(-CheckDays))
+                                        // if (pos.CreditTrade >= CheckMoney && pos.ActivationState == 0 && TransferTime < pos.BindingTime && pos.BindingTime > DateTime.Now.AddDays(-CheckDays))
                                         {
                                             pos.ActivationState = 1;
                                             pos.ActivationTime = DateTime.Now;