|
@@ -283,34 +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);
|
|
|
- // }
|
|
|
+ // 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);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
//批量补服务费奖励
|