|
@@ -819,23 +819,23 @@ namespace MySystem
|
|
|
{
|
|
|
minute = 60 * 24 * 30;
|
|
|
}
|
|
|
- Utils.Instance.PrizeRecord(db, 1, pos.PosSn, "条件:贷记卡是否刷满" + CheckMoney + ";贷记卡交易:" + pos.CreditTrade + "");
|
|
|
- Utils.Instance.PrizeRecord(db, 1, pos.PosSn, "条件:是否有机具所属人;机具所属人Id:" + pos.BuyUserId + "");
|
|
|
- Utils.Instance.PrizeRecord(db, 1, pos.PosSn, "条件:是否未激活;机具激活状态:" + pos.ActivationState + "");
|
|
|
- Utils.Instance.PrizeRecord(db, 1, pos.PosSn, "条件:划拨时间不能超过绑定时间" + minute + "分钟;划拨时间:" + pos.TransferTime.Value.ToString() + ",绑定时间:" + pos.BindingTime.Value.ToString());
|
|
|
+ Utils.Instance.PrizeRecord(1, pos.PosSn, "条件:贷记卡是否刷满" + CheckMoney + ";贷记卡交易:" + pos.CreditTrade + "");
|
|
|
+ Utils.Instance.PrizeRecord(1, pos.PosSn, "条件:是否有机具所属人;机具所属人Id:" + pos.BuyUserId + "");
|
|
|
+ Utils.Instance.PrizeRecord(1, pos.PosSn, "条件:是否未激活;机具激活状态:" + pos.ActivationState + "");
|
|
|
+ Utils.Instance.PrizeRecord(1, pos.PosSn, "条件:划拨时间不能超过绑定时间" + minute + "分钟;划拨时间:" + pos.TransferTime.Value.ToString() + ",绑定时间:" + pos.BindingTime.Value.ToString());
|
|
|
if (pos.CreditTrade >= CheckMoney && pos.BuyUserId > 0 && pos.ActivationState == 0 && TransferTime.AddMinutes(-minute) < pos.BindingTime)
|
|
|
{
|
|
|
- Utils.Instance.PrizeRecord(db, 1, pos.PosSn, "满足条件");
|
|
|
+ Utils.Instance.PrizeRecord(1, pos.PosSn, "满足条件");
|
|
|
pos.ActivationState = 1;
|
|
|
pos.ActivationTime = now;
|
|
|
- Utils.Instance.PrizeRecord(db, 1, pos.PosSn, "条件:是否营训");
|
|
|
+ Utils.Instance.PrizeRecord(1, pos.PosSn, "条件:是否营训");
|
|
|
if(pos.CardType == 101)
|
|
|
{
|
|
|
- Utils.Instance.PrizeRecord(db, 1, pos.PosSn, "是营训");
|
|
|
+ Utils.Instance.PrizeRecord(1, pos.PosSn, "是营训");
|
|
|
pos.IsPurchase = 1;
|
|
|
- Utils.Instance.PrizeRecord(db, 1, pos.PosSn, "取消循环资格");
|
|
|
+ Utils.Instance.PrizeRecord(1, pos.PosSn, "取消循环资格");
|
|
|
}
|
|
|
- Utils.Instance.PrizeRecord(db, 1, pos.PosSn, "条件:是否关联商户信息");
|
|
|
+ Utils.Instance.PrizeRecord(1, pos.PosSn, "条件:是否关联商户信息");
|
|
|
PxcModels.PosMerchantInfo merchant = db.PosMerchantInfo.FirstOrDefault(m => m.Id == pos.BindMerchantId);
|
|
|
if (merchant != null)
|
|
|
{
|
|
@@ -843,26 +843,26 @@ namespace MySystem
|
|
|
merchant.MerStandardDate = now;
|
|
|
db.SaveChanges();
|
|
|
|
|
|
- Utils.Instance.PrizeRecord(db, 1, pos.PosSn, "已关联");
|
|
|
+ Utils.Instance.PrizeRecord(1, pos.PosSn, "已关联");
|
|
|
//发放开机奖励
|
|
|
- Utils.Instance.PrizeRecord(db, 1, pos.PosSn, "条件:绑定时间不超过" + CheckDays + "天;当前绑定时间:" + pos.BindingTime.ToString() + "");
|
|
|
- Utils.Instance.PrizeRecord(db, 1, pos.PosSn, "条件:非营训;当前类型:" + pos.CardType);
|
|
|
- Utils.Instance.PrizeRecord(db, 1, pos.PosSn, "条件:奖励开关;当前:" + PrizeFlag);
|
|
|
+ Utils.Instance.PrizeRecord(1, pos.PosSn, "条件:绑定时间不超过" + CheckDays + "天;当前绑定时间:" + pos.BindingTime.ToString() + "");
|
|
|
+ Utils.Instance.PrizeRecord(1, pos.PosSn, "条件:非营训;当前类型:" + pos.CardType);
|
|
|
+ Utils.Instance.PrizeRecord(1, pos.PosSn, "条件:奖励开关;当前:" + PrizeFlag);
|
|
|
if(pos.BindingTime > now.AddDays(-CheckDays) && pos.CardType < 100 && PrizeFlag)
|
|
|
{
|
|
|
- Utils.Instance.PrizeRecord(db, 1, pos.PosSn, "满足条件,发放开机奖励");
|
|
|
+ Utils.Instance.PrizeRecord(1, pos.PosSn, "满足条件,发放开机奖励");
|
|
|
RedisDbconn.Instance.AddList("OpenRewardQueue", pos.Id.ToString());
|
|
|
if(pos.BrandId == 14)
|
|
|
{
|
|
|
- Utils.Instance.PrizeRecord(db, 1, pos.PosSn, "满足条件,发放运营中心奖励");
|
|
|
+ Utils.Instance.PrizeRecord(1, pos.PosSn, "满足条件,发放运营中心奖励");
|
|
|
RedisDbconn.Instance.AddList("OperatePrizeQueue", pos.Id);
|
|
|
- Utils.Instance.PrizeRecord(db, 1, pos.PosSn, "条件:大盟主标记;当前大盟主Id:" + pos.LeaderUserId);
|
|
|
+ Utils.Instance.PrizeRecord(1, pos.PosSn, "条件:大盟主标记;当前大盟主Id:" + pos.LeaderUserId);
|
|
|
PxcModels.Leaders leader = db.Leaders.FirstOrDefault(m => m.Id == pos.LeaderUserId) ?? new PxcModels.Leaders();
|
|
|
DateTime ExpiredDate = leader.ExpiredDate == null ? DateTime.Parse("1900-01-01") : leader.ExpiredDate.Value;
|
|
|
- Utils.Instance.PrizeRecord(db, 1, pos.PosSn, "条件:盟主是否过期;过期时间:" + pos.LeaderUserId);
|
|
|
+ Utils.Instance.PrizeRecord(1, pos.PosSn, "条件:盟主是否过期;过期时间:" + pos.LeaderUserId);
|
|
|
if(pos.LeaderUserId > 0 && ExpiredDate > now)
|
|
|
{
|
|
|
- Utils.Instance.PrizeRecord(db, 1, pos.PosSn, "满足条件,发放大盟主奖励");
|
|
|
+ Utils.Instance.PrizeRecord(1, pos.PosSn, "满足条件,发放大盟主奖励");
|
|
|
RedisDbconn.Instance.AddList("LeaderPrizeQueue", pos.Id);
|
|
|
}
|
|
|
}
|
|
@@ -872,22 +872,22 @@ namespace MySystem
|
|
|
decimal Deposit = decimal.Parse(function.CheckNum(pos.SeoKeyword));
|
|
|
if(pos.BrandId != 14)
|
|
|
{
|
|
|
- Utils.Instance.PrizeRecord(db, 1, pos.PosSn, "条件:有押金;当前押金:" + Deposit);
|
|
|
- Utils.Instance.PrizeRecord(db, 1, pos.PosSn, "条件:大盟主标记;当前大盟主Id:" + pos.LeaderUserId);
|
|
|
+ Utils.Instance.PrizeRecord(1, pos.PosSn, "条件:有押金;当前押金:" + Deposit);
|
|
|
+ Utils.Instance.PrizeRecord(1, pos.PosSn, "条件:大盟主标记;当前大盟主Id:" + pos.LeaderUserId);
|
|
|
PxcModels.Leaders leader = db.Leaders.FirstOrDefault(m => m.Id == pos.LeaderUserId) ?? new PxcModels.Leaders();
|
|
|
DateTime ExpiredDate = leader.ExpiredDate == null ? DateTime.Parse("1900-01-01") : leader.ExpiredDate.Value;
|
|
|
- Utils.Instance.PrizeRecord(db, 1, pos.PosSn, "条件:盟主是否过期;过期时间:" + pos.LeaderUserId);
|
|
|
- Utils.Instance.PrizeRecord(db, 1, pos.PosSn, "条件:绑定时间不超过" + CheckDays + "天;绑定时间:" + pos.BindingTime.Value.ToString() + "");
|
|
|
+ Utils.Instance.PrizeRecord(1, pos.PosSn, "条件:盟主是否过期;过期时间:" + pos.LeaderUserId);
|
|
|
+ Utils.Instance.PrizeRecord(1, pos.PosSn, "条件:绑定时间不超过" + CheckDays + "天;绑定时间:" + pos.BindingTime.Value.ToString() + "");
|
|
|
}
|
|
|
if (Deposit > 0 && pos.LeaderUserId > 0 && db.Leaders.Any(m => m.Id == pos.LeaderUserId && m.ExpiredDate > now) && pos.BindingTime > now.AddDays(-CheckDays) && pos.CardType < 100 && PrizeFlag)
|
|
|
{
|
|
|
- Utils.Instance.PrizeRecord(db, 1, pos.PosSn, "满足条件,发放大盟主奖励");
|
|
|
+ Utils.Instance.PrizeRecord(1, pos.PosSn, "满足条件,发放大盟主奖励");
|
|
|
RedisDbconn.Instance.AddList("LeaderPrizeQueue", pos.Id);
|
|
|
}
|
|
|
//发放运营中心奖励
|
|
|
if (Deposit > 0 && pos.BindingTime > now.AddDays(-CheckDays) && pos.CardType < 100 && PrizeFlag)
|
|
|
{
|
|
|
- Utils.Instance.PrizeRecord(db, 1, pos.PosSn, "满足条件,发放运营中心奖励");
|
|
|
+ Utils.Instance.PrizeRecord(1, pos.PosSn, "满足条件,发放运营中心奖励");
|
|
|
RedisDbconn.Instance.AddList("OperatePrizeQueue", pos.Id);
|
|
|
}
|
|
|
if(pos.CardType < 100)
|
|
@@ -916,13 +916,13 @@ namespace MySystem
|
|
|
//推送激活数据
|
|
|
Utils.Instance.SendActData(pos);
|
|
|
}
|
|
|
- Utils.Instance.PrizeRecord(db, 1, pos.PosSn, "条件:已激活;当前状态:" + pos.ActivationState);
|
|
|
- Utils.Instance.PrizeRecord(db, 1, pos.PosSn, "条件:绑定后台30天到60天之间;绑定时间:" + pos.BindingTime.Value.ToString() + "");
|
|
|
- Utils.Instance.PrizeRecord(db, 1, pos.PosSn, "条件:贷记卡是否刷满10000;贷记卡交易:" + pos.CreditTrade + "");
|
|
|
- Utils.Instance.PrizeRecord(db, 1, pos.PosSn, "条件:非营训;当前类型:" + pos.CardType);
|
|
|
+ Utils.Instance.PrizeRecord(1, pos.PosSn, "条件:已激活;当前状态:" + pos.ActivationState);
|
|
|
+ Utils.Instance.PrizeRecord(1, pos.PosSn, "条件:绑定后台30天到60天之间;绑定时间:" + pos.BindingTime.Value.ToString() + "");
|
|
|
+ Utils.Instance.PrizeRecord(1, pos.PosSn, "条件:贷记卡是否刷满10000;贷记卡交易:" + pos.CreditTrade + "");
|
|
|
+ Utils.Instance.PrizeRecord(1, pos.PosSn, "条件:非营训;当前类型:" + pos.CardType);
|
|
|
if(pos.ActivationState == 1 && pos.BindingTime.Value.AddDays(30) <= DateTime.Now && pos.BindingTime.Value.AddDays(60) > DateTime.Now && pos.CreditTrade >= 10000 && pos.CardType < 100)
|
|
|
{
|
|
|
- Utils.Instance.PrizeRecord(db, 1, pos.PosSn, "满足条件,发放盟主开机奖励");
|
|
|
+ Utils.Instance.PrizeRecord(1, pos.PosSn, "满足条件,发放盟主开机奖励");
|
|
|
RedisDbconn.Instance.AddList("LeaderRewardQueue", pos.Id.ToString());
|
|
|
}
|
|
|
}
|