|
@@ -272,7 +272,6 @@ namespace MySystem.Controllers
|
|
|
DateTime now = DateTime.Now;
|
|
|
WebCMSEntities db = new WebCMSEntities();
|
|
|
List<string> poslist = new List<string>();
|
|
|
- poslist.Add("00002402045980179525");
|
|
|
foreach(string PosSn in poslist)
|
|
|
{
|
|
|
PosMachinesTwo pos = db.PosMachinesTwo.FirstOrDefault(m => m.PosSn == PosSn);
|
|
@@ -284,47 +283,41 @@ namespace MySystem.Controllers
|
|
|
DateTime TransferTime = pos.TransferTime == null ? DateTime.Now : pos.TransferTime.Value;
|
|
|
|
|
|
//广电卡批量补盟主奖励和运营中心奖励
|
|
|
- if (pos.CreditTrade >= 1000 && pos.BuyUserId > 0 && pos.ActivationState == 0 && TransferTime.AddMinutes(-30) < pos.BindingTime)
|
|
|
+ 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.BindingTime > now.AddDays(-30) && pos.CardType < 100)
|
|
|
+ if(pos.LeaderUserId > 0 && db.Leaders.Any(m => m.Id == pos.LeaderUserId && m.ExpiredDate > now))
|
|
|
{
|
|
|
- if(pos.BrandId == 14)
|
|
|
- {
|
|
|
- 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)
|
|
|
- {
|
|
|
- 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.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(decimal.Parse(function.CheckNum(pos.SeoKeyword)) > 0)
|
|
|
- {
|
|
|
- StatService.Instance.PreActPrize(db, pos, merchant, pos.SeoKeyword);
|
|
|
- }
|
|
|
+ // if(decimal.Parse(function.CheckNum(pos.SeoKeyword)) > 0 && pos.CardType < 100)
|
|
|
+ // {
|
|
|
+ // StatService.Instance.PreActPrize(db, pos, merchant, pos.SeoKeyword);
|
|
|
+ // }
|
|
|
}
|
|
|
}
|
|
|
db.Dispose();
|