|
@@ -2205,7 +2205,7 @@ namespace MySystem
|
|
|
function.WriteLog(user.UserLevel.ToString(), "分润补贴日志");
|
|
|
function.WriteLog(pos.PosSn, "分润补贴日志");
|
|
|
}
|
|
|
- if (UserLevel == maxLevel && UserLevel == curLevel) //判断当前创客是否有直推的激活机具,并且在活动时间内
|
|
|
+ if (curLevel == maxLevel) //判断当前创客是否有直推的激活机具,并且在活动时间内
|
|
|
{
|
|
|
break;
|
|
|
}
|
|
@@ -2259,56 +2259,56 @@ namespace MySystem
|
|
|
}
|
|
|
|
|
|
//分润补贴
|
|
|
- if (HelpTime == 1 && level == 1)
|
|
|
- {
|
|
|
- function.WriteLog("满足条件", "分润补贴日志");
|
|
|
- int SubsidyUserId = pos.BuyUserId;
|
|
|
- Users subuser = dbnew.Users.FirstOrDefault(m => m.Id == SubsidyUserId) ?? new Users();
|
|
|
- int subUserLevel = subuser.UserLevel;
|
|
|
- if(subUserLevel < 5)
|
|
|
- {
|
|
|
- function.WriteLog("1:" + subUserLevel, "分润补贴日志");
|
|
|
- UserRankWhite subrank = dbnew.UserRankWhite.FirstOrDefault(m => m.Id == subuser.Id && m.UpdateDate > now);
|
|
|
- if (subrank != null)
|
|
|
- {
|
|
|
- if (subrank.Rank > subUserLevel)
|
|
|
- {
|
|
|
- subUserLevel = subrank.Rank;
|
|
|
- }
|
|
|
- }
|
|
|
- if(subUserLevel < 5)
|
|
|
- {
|
|
|
- function.WriteLog("2:" + subUserLevel, "分润补贴日志");
|
|
|
- ProfitObjectLevels sublevel = RedisDbconn.Instance.Get<ProfitObjectLevels>("pobjlv" + LevelKindId + ":" + subUserLevel); //获取当前等级参数
|
|
|
- if (sublevel != null)
|
|
|
- {
|
|
|
- function.WriteLog("3:" + sublevel.Percents, "分润补贴日志");
|
|
|
- decimal otherPercent = 0.001M - sublevel.Percents;
|
|
|
- decimal otherMoney = TradeAmt * otherPercent;
|
|
|
- if (otherMoney >= obj.MinProfitVal)
|
|
|
- {
|
|
|
- result.Add(new ProfitResult()
|
|
|
- {
|
|
|
- UserId = subuser.Id,
|
|
|
- UserNav = subuser.ParentNav,
|
|
|
- Money = PublicFunction.NumberFormat(otherMoney),
|
|
|
- ProfitRate = otherPercent,
|
|
|
- Message = "分润补贴",
|
|
|
- BankCardType = BankCardType,
|
|
|
- QrPayFlag = QrPayFlag,
|
|
|
- DirectFlag = 1,
|
|
|
- BrandId = pos.BrandId,
|
|
|
- IsSubsidy = 1,
|
|
|
- MerchantId = pos.BindMerchantId,
|
|
|
- TradeAmount = TradeAmt,
|
|
|
- HelpFlag = HelpTime,
|
|
|
- PosSn = pos.PosSn,
|
|
|
- });
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
+ // if (HelpTime == 1 && level == 1)
|
|
|
+ // {
|
|
|
+ // function.WriteLog("满足条件", "分润补贴日志");
|
|
|
+ // int SubsidyUserId = pos.BuyUserId;
|
|
|
+ // Users subuser = dbnew.Users.FirstOrDefault(m => m.Id == SubsidyUserId) ?? new Users();
|
|
|
+ // int subUserLevel = subuser.UserLevel;
|
|
|
+ // if(subUserLevel < 5)
|
|
|
+ // {
|
|
|
+ // function.WriteLog("1:" + subUserLevel, "分润补贴日志");
|
|
|
+ // UserRankWhite subrank = dbnew.UserRankWhite.FirstOrDefault(m => m.Id == subuser.Id && m.UpdateDate > now);
|
|
|
+ // if (subrank != null)
|
|
|
+ // {
|
|
|
+ // if (subrank.Rank > subUserLevel)
|
|
|
+ // {
|
|
|
+ // subUserLevel = subrank.Rank;
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // if(subUserLevel < 5)
|
|
|
+ // {
|
|
|
+ // function.WriteLog("2:" + subUserLevel, "分润补贴日志");
|
|
|
+ // ProfitObjectLevels sublevel = RedisDbconn.Instance.Get<ProfitObjectLevels>("pobjlv" + LevelKindId + ":" + subUserLevel); //获取当前等级参数
|
|
|
+ // if (sublevel != null)
|
|
|
+ // {
|
|
|
+ // function.WriteLog("3:" + sublevel.Percents, "分润补贴日志");
|
|
|
+ // decimal otherPercent = 0.001M - sublevel.Percents;
|
|
|
+ // decimal otherMoney = TradeAmt * otherPercent;
|
|
|
+ // if (otherMoney >= obj.MinProfitVal)
|
|
|
+ // {
|
|
|
+ // result.Add(new ProfitResult()
|
|
|
+ // {
|
|
|
+ // UserId = subuser.Id,
|
|
|
+ // UserNav = subuser.ParentNav,
|
|
|
+ // Money = PublicFunction.NumberFormat(otherMoney),
|
|
|
+ // ProfitRate = otherPercent,
|
|
|
+ // Message = "分润补贴",
|
|
|
+ // BankCardType = BankCardType,
|
|
|
+ // QrPayFlag = QrPayFlag,
|
|
|
+ // DirectFlag = 1,
|
|
|
+ // BrandId = pos.BrandId,
|
|
|
+ // IsSubsidy = 1,
|
|
|
+ // MerchantId = pos.BindMerchantId,
|
|
|
+ // TradeAmount = TradeAmt,
|
|
|
+ // HelpFlag = HelpTime,
|
|
|
+ // PosSn = pos.PosSn,
|
|
|
+ // });
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // }
|
|
|
}
|
|
|
}
|
|
|
curLevel = UserLevel;
|