|
@@ -300,6 +300,27 @@ namespace MySystem
|
|
if (GetUserId > 0)
|
|
if (GetUserId > 0)
|
|
{
|
|
{
|
|
doActiveReward(db, merchant, pos, GetUserId, ParentNav, TopUserId, ActPrize);
|
|
doActiveReward(db, merchant, pos, GetUserId, ParentNav, TopUserId, ActPrize);
|
|
|
|
+ DateTime check = DateTime.Parse("2022-04-01 00:00:00");
|
|
|
|
+ if((pos.BrandId == 1 || pos.BrandId == 3) && pos.CreateDate < check)
|
|
|
|
+ {
|
|
|
|
+ decimal amt = 0;
|
|
|
|
+ if(DateTime.Now > DateTime.Parse("2022-10-01 00:00:00") && DateTime.Now < DateTime.Parse("2022-11-01 00:00:00"))
|
|
|
|
+ {
|
|
|
|
+ amt = 30;
|
|
|
|
+ }
|
|
|
|
+ else if(DateTime.Now > DateTime.Parse("2022-11-01 00:00:00") && DateTime.Now < DateTime.Parse("2022-12-01 00:00:00"))
|
|
|
|
+ {
|
|
|
|
+ amt = 20;
|
|
|
|
+ }
|
|
|
|
+ else if(DateTime.Now > DateTime.Parse("2022-12-01 00:00:00") && DateTime.Now < DateTime.Parse("2023-01-01 00:00:00"))
|
|
|
|
+ {
|
|
|
|
+ amt = 10;
|
|
|
|
+ }
|
|
|
|
+ if(amt > 0)
|
|
|
|
+ {
|
|
|
|
+ doActiveReward(db, merchant, pos, GetUserId, ParentNav, TopUserId, amt, 0, 1);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
else if(pos.BrandId == 6 && ActPrize == 0)
|
|
else if(pos.BrandId == 6 && ActPrize == 0)
|
|
@@ -352,7 +373,7 @@ namespace MySystem
|
|
db.Dispose();
|
|
db.Dispose();
|
|
}
|
|
}
|
|
|
|
|
|
- public void doActiveReward(WebCMSEntities db, PosMerchantInfo merchant, PosMachinesTwo pos, int GetUserId, string ParentNav, int TopUserId, decimal ActPrize, int ChangeType = 0)
|
|
|
|
|
|
+ public void doActiveReward(WebCMSEntities db, PosMerchantInfo merchant, PosMachinesTwo pos, int GetUserId, string ParentNav, int TopUserId, decimal ActPrize, int ChangeType = 0, int ActType = 0)
|
|
{
|
|
{
|
|
bool check = db.ActiveReward.Any(m => m.KqMerNo == merchant.KqMerNo && m.RewardAmount == ActPrize);
|
|
bool check = db.ActiveReward.Any(m => m.KqMerNo == merchant.KqMerNo && m.RewardAmount == ActPrize);
|
|
if (!check)
|
|
if (!check)
|
|
@@ -373,7 +394,7 @@ namespace MySystem
|
|
KqSnNo = pos.PosSn, //渠道SN号
|
|
KqSnNo = pos.PosSn, //渠道SN号
|
|
SnType = pos.PosSnType, //机具类型
|
|
SnType = pos.PosSnType, //机具类型
|
|
SnApplyUserId = pos.BuyUserId, //机具申请创客
|
|
SnApplyUserId = pos.BuyUserId, //机具申请创客
|
|
- ActType = 0, //激活类型
|
|
|
|
|
|
+ ActType = ActType, //激活类型
|
|
SnStoreId = pos.StoreId, //SN仓库
|
|
SnStoreId = pos.StoreId, //SN仓库
|
|
RewardTips = "激活奖励", //奖励描述
|
|
RewardTips = "激活奖励", //奖励描述
|
|
Remark = "激活奖励", //备注
|
|
Remark = "激活奖励", //备注
|