浏览代码

开机奖励记录机具Id

lcl 1 年之前
父节点
当前提交
d3901abd69
共有 2 个文件被更改,包括 30 次插入29 次删除
  1. 1 0
      AppStart/Helper/StatService.cs
  2. 29 29
      Controllers/HomeController.cs

+ 1 - 0
AppStart/Helper/StatService.cs

@@ -3264,6 +3264,7 @@ namespace MySystem
                 AfterFreezeAmount = AfterFreezeAmount, //变更后冻结金额
                 BeforeBalanceAmount = BeforeBalanceAmount, //变更前余额
                 AfterBalanceAmount = AfterBalanceAmount, //变更后余额
+                QueryCount = pos.Id, //关联机具Id
             }).Entity;
             db.SaveChanges();
         }

+ 29 - 29
Controllers/HomeController.cs

@@ -283,39 +283,39 @@ namespace MySystem.Controllers
                         DateTime TransferTime = pos.TransferTime == null ? DateTime.Now : pos.TransferTime.Value;
 
                         //广电卡批量补盟主奖励和运营中心奖励
-                        // if (pos.BrandId == 14 && pos.BuyUserId > 0 && pos.ActivationState == 1 && TransferTime < pos.BindingTime && pos.BindingTime > now.AddDays(-30) && pos.CardType > 0 && pos.CardType < 100)
-                        // {
-                        //     if(pos.LeaderUserId > 0 && db.Leaders.Any(m => m.Id == pos.LeaderUserId && m.ExpiredDate > now))
-                        //     {
-                        //         RedisDbconn.Instance.AddList("LeaderPrizeQueue", pos.Id);
-                        //     }
-                        //     RedisDbconn.Instance.AddList("OperatePrizeQueue", pos.Id);
-                        // }
-
-                        //0押金返30的奖励批量补录
-                        if(pos.ActivationState == 1 && (string.IsNullOrEmpty(pos.SeoKeyword) || pos.SeoKeyword == "0") && pos.CreditTrade >= 5000 && pos.CardType < 100)
+                        if (pos.BrandId == 14 && pos.BuyUserId > 0 && pos.ActivationState == 1 && TransferTime < pos.BindingTime && pos.BindingTime > now.AddDays(-30) && pos.CardType > 0 && pos.CardType < 100)
                         {
-                            Users user = db.Users.FirstOrDefault(m => m.Id == pos.BuyUserId);
-                            if (user != null)
+                            if(pos.LeaderUserId > 0 && db.Leaders.Any(m => m.Id == pos.LeaderUserId && m.ExpiredDate > now))
                             {
-                                int GetUserId = user.Id;
-                                string ParentNav = user.ParentNav;
-                                int TopUserId = 0;
-                                if (!string.IsNullOrEmpty(ParentNav))
-                                {
-                                    TopUserId = int.Parse(ParentNav.Trim(',').Replace(",,", ",").Split(',')[0]);
-                                }
-                                if(pos.BindingTime.Value.AddDays(30) >= pos.ActivationTime)
-                                {
-                                    // StatService.Instance.doActiveReward(db, merchant, pos, GetUserId, ParentNav, TopUserId, 30);
-                                    // if(pos.LeaderUserId > 0 && db.Leaders.Any(m => m.Id == pos.LeaderUserId && m.ExpiredDate > now))
-                                    // {
-                                    //     RedisDbconn.Instance.AddList("LeaderPrizeQueue", pos.Id);
-                                    // }
-                                    // RedisDbconn.Instance.AddList("OperatePrizeQueue", pos.Id);
-                                }
+                                RedisDbconn.Instance.AddList("LeaderPrizeQueue", pos.Id);
                             }
+                            RedisDbconn.Instance.AddList("OperatePrizeQueue", pos.Id);
                         }
+
+                        //0押金返30的奖励批量补录
+                        // if(pos.ActivationState == 1 && (string.IsNullOrEmpty(pos.SeoKeyword) || pos.SeoKeyword == "0") && pos.CreditTrade >= 5000 && pos.CardType < 100)
+                        // {
+                        //     Users user = db.Users.FirstOrDefault(m => m.Id == pos.BuyUserId);
+                        //     if (user != null)
+                        //     {
+                        //         int GetUserId = user.Id;
+                        //         string ParentNav = user.ParentNav;
+                        //         int TopUserId = 0;
+                        //         if (!string.IsNullOrEmpty(ParentNav))
+                        //         {
+                        //             TopUserId = int.Parse(ParentNav.Trim(',').Replace(",,", ",").Split(',')[0]);
+                        //         }
+                        //         if(pos.BindingTime.Value.AddDays(30) >= pos.ActivationTime)
+                        //         {
+                        //             StatService.Instance.doActiveReward(db, merchant, pos, GetUserId, ParentNav, TopUserId, 30);
+                        //             if(pos.LeaderUserId > 0 && db.Leaders.Any(m => m.Id == pos.LeaderUserId && m.ExpiredDate > now))
+                        //             {
+                        //                 RedisDbconn.Instance.AddList("LeaderPrizeQueue", pos.Id);
+                        //             }
+                        //             RedisDbconn.Instance.AddList("OperatePrizeQueue", pos.Id);
+                        //         }
+                        //     }
+                        // }
                     }
 
                     //批量补服务费奖励