|
@@ -168,33 +168,33 @@ namespace MySystem
|
|
|
if(Deposit == 399) Prize = 100;
|
|
|
}
|
|
|
|
|
|
- if(Prize > 0)
|
|
|
+ PxcModels.Users user = db.Users.FirstOrDefault(m => m.Id == pos.BuyUserId) ?? new PxcModels.Users();
|
|
|
+ int TopUserId = 0;
|
|
|
+ if (!string.IsNullOrEmpty(user.ParentNav))
|
|
|
+ {
|
|
|
+ TopUserId = int.Parse(user.ParentNav.Trim(',').Replace(",,", ",").Split(',')[0]);
|
|
|
+ }
|
|
|
+ pos.ActivationState = 1;
|
|
|
+ pos.ActivationTime = now;
|
|
|
+ merchant.ActiveStatus = 1;
|
|
|
+ merchant.MerStandardDate = now;
|
|
|
+ db.SaveChanges();
|
|
|
+ if (Prize > 0)
|
|
|
{
|
|
|
- PxcModels.Users user = db.Users.FirstOrDefault(m => m.Id == pos.BuyUserId) ?? new PxcModels.Users();
|
|
|
- int TopUserId = 0;
|
|
|
- if (!string.IsNullOrEmpty(user.ParentNav))
|
|
|
- {
|
|
|
- TopUserId = int.Parse(user.ParentNav.Trim(',').Replace(",,", ",").Split(',')[0]);
|
|
|
- }
|
|
|
- pos.ActivationState = 1;
|
|
|
- pos.ActivationTime = now;
|
|
|
- merchant.ActiveStatus = 1;
|
|
|
- merchant.MerStandardDate = now;
|
|
|
- db.SaveChanges();
|
|
|
StatService.Instance.doActiveReward(db, merchant, pos, pos.BuyUserId, user.ParentNav, TopUserId, Prize);
|
|
|
- if(pos.CardType < 100)
|
|
|
- {
|
|
|
- RedisDbconn.Instance.AddList("OpenRewardQueue", pos.Id.ToString());
|
|
|
- }
|
|
|
- if (Deposit > 0 && pos.LeaderUserId > 0 && db.Leaders.Any(m => m.Id == pos.LeaderUserId && m.ExpiredDate > now) && pos.CardType < 100)
|
|
|
- {
|
|
|
- RedisDbconn.Instance.AddList("LeaderPrizeQueue", pos.Id);
|
|
|
- }
|
|
|
- //发放运营中心奖励
|
|
|
- if (Deposit > 0 && pos.CardType < 100)
|
|
|
- {
|
|
|
- RedisDbconn.Instance.AddList("OperatePrizeQueue", pos.Id);
|
|
|
- }
|
|
|
+ }
|
|
|
+ if (pos.CardType < 100)
|
|
|
+ {
|
|
|
+ RedisDbconn.Instance.AddList("OpenRewardQueue", pos.Id.ToString());
|
|
|
+ }
|
|
|
+ if (Deposit > 0 && pos.LeaderUserId > 0 && db.Leaders.Any(m => m.Id == pos.LeaderUserId && m.ExpiredDate > now) && pos.CardType < 100)
|
|
|
+ {
|
|
|
+ RedisDbconn.Instance.AddList("LeaderPrizeQueue", pos.Id);
|
|
|
+ }
|
|
|
+ //发放运营中心奖励
|
|
|
+ if (Deposit > 0 && pos.CardType < 100)
|
|
|
+ {
|
|
|
+ RedisDbconn.Instance.AddList("OperatePrizeQueue", pos.Id);
|
|
|
}
|
|
|
}
|
|
|
else
|