|
@@ -79,6 +79,42 @@ namespace MySystem
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ if(pos.BrandId == 18 || pos.BrandId == 19 || pos.BrandId == 20 || pos.BrandId == 21)
|
|
|
+ {
|
|
|
+ decimal Deposit = decimal.Parse(function.CheckNum(pos.SeoKeyword));
|
|
|
+ decimal Prize = 0;
|
|
|
+ if(Deposit == 198) Prize = 70;
|
|
|
+ if(Deposit == 249) Prize = 100;
|
|
|
+ if(Deposit == 228) Prize = 61;
|
|
|
+ if(Deposit == 380) Prize = 151;
|
|
|
+ if(Deposit == 399) Prize = 100;
|
|
|
+ if(Prize > 0)
|
|
|
+ {
|
|
|
+ PxcModels.PosMerchantInfo merchant = db.PosMerchantInfo.FirstOrDefault(m => m.Id == pos.BindMerchantId) ?? new PxcModels.PosMerchantInfo();
|
|
|
+ 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]);
|
|
|
+ }
|
|
|
+ StatService.Instance.doActiveReward(db, merchant, pos, pos.BuyUserId, user.ParentNav, TopUserId, Prize);
|
|
|
+ }
|
|
|
+ DateTime now = DateTime.Now;
|
|
|
+ SycnSpTradeService.Instance.ActPos(db, pos, 0, 0, false);
|
|
|
+ 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);
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
ActivateRecord edit = spdb.ActivateRecord.FirstOrDefault(m => m.Id == act.Id);
|
|
|
if (edit != null)
|