|
@@ -708,8 +708,8 @@ namespace MySystem
|
|
|
|
|
|
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 check1 = db.ActiveReward.Any(m => m.KqSnNo == pos.PosSn && m.RewardAmount == ActPrize);
|
|
|
+ bool check = db.ActiveReward.Any(m => m.KqMerNo == merchant.KqMerNo && m.RewardAmount == ActPrize && m.ActType == ActType);
|
|
|
+ bool check1 = db.ActiveReward.Any(m => m.KqSnNo == pos.PosSn && m.RewardAmount == ActPrize && m.ActType == ActType);
|
|
|
if (!check && !check1)
|
|
|
{
|
|
|
function.WriteLog(DateTime.Now.ToString() + ":" + pos.PosSn, "实时处理激活奖励");
|
|
@@ -1171,7 +1171,7 @@ namespace MySystem
|
|
|
string ParentNav = function.CheckNull(user.ParentNav) + "," + user.Id + ",";
|
|
|
if (!string.IsNullOrEmpty(ParentNav))
|
|
|
{
|
|
|
- decimal Prize = 20;
|
|
|
+ decimal Prize = 0;
|
|
|
if(pos.BrandId == 14)
|
|
|
{
|
|
|
Prize = 19 * 0.3M;
|
|
@@ -1250,16 +1250,16 @@ namespace MySystem
|
|
|
int PosId = int.Parse(content);
|
|
|
Thread.Sleep(1000);
|
|
|
WebCMSEntities db = new WebCMSEntities();
|
|
|
- PosMachinesTwo pos = db.PosMachinesTwo.FirstOrDefault(m => m.Id == PosId && m.ActivationState == 1 && ((!string.IsNullOrEmpty(m.SeoKeyword) && m.SeoKeyword != "0" && m.CreditTrade >= 1000) || m.BrandId == 14));
|
|
|
+ PosMachinesTwo pos = db.PosMachinesTwo.FirstOrDefault(m => m.Id == PosId && m.ActivationState == 1 && !string.IsNullOrEmpty(m.SeoKeyword) && m.SeoKeyword != "0" && m.CreditTrade >= 10000);
|
|
|
if (pos != null)
|
|
|
{
|
|
|
function.WriteLog("sn:" + pos.PosSn, "盟主开机奖励发放日志");
|
|
|
bool IsGet = db.OpenRewardDetail.Any(m => m.SnNo == pos.PosSn);
|
|
|
- if (pos.BindingTime > DateTime.Now.AddDays(-30) && !IsGet)
|
|
|
+ if (!IsGet)
|
|
|
{
|
|
|
decimal ActPrize = decimal.Parse(function.CheckNum(pos.SeoKeyword));
|
|
|
function.WriteLog("押金:" + pos.SeoKeyword, "盟主开机奖励发放日志");
|
|
|
- if (ActPrize > 0 || pos.BrandId == 14)
|
|
|
+ if (ActPrize > 0)
|
|
|
{
|
|
|
PosMerchantInfo merchant = db.PosMerchantInfo.FirstOrDefault(m => m.Id == pos.BindMerchantId);
|
|
|
if (merchant != null)
|
|
@@ -3095,7 +3095,7 @@ namespace MySystem
|
|
|
{
|
|
|
TopUserId = int.Parse(ParentNav.Trim(',').Replace(",,", ",").Split(',')[0]);
|
|
|
}
|
|
|
- doActiveReward(db, merchant, pos, GetUserId, user.ParentNav, TopUserId, ActPrize);
|
|
|
+ doActiveReward(db, merchant, pos, GetUserId, user.ParentNav, TopUserId, ActPrize, 0, 1);
|
|
|
}
|
|
|
}
|
|
|
}
|