|
@@ -1846,182 +1846,6 @@ namespace MySystem
|
|
|
SubsidyProfit = SubsidyProfit, //商户(非云闪付)贷记卡交易分润补贴金额
|
|
|
});
|
|
|
}
|
|
|
- // else
|
|
|
- // {
|
|
|
- // decimal CreditTradeAmt = 0;
|
|
|
- // decimal CreditTradeProfit = 0;
|
|
|
- // decimal QrCreditTradeAmt = 0;
|
|
|
- // decimal QrCreditProfitRate = 0;
|
|
|
- // decimal QrCreditProfitStandardRate = 0;
|
|
|
- // decimal QrCreditAddOrSubRate = 0;
|
|
|
- // decimal QrCreditTradeProfit = 0;
|
|
|
- // decimal NonQrCreditTradeAmt = 0;
|
|
|
- // decimal NotHelpCreditTradeAmt = 0;
|
|
|
- // decimal NotHelpCreditTradeProfit = 0;
|
|
|
- // decimal NotHelpCreditProfitRate = 0;
|
|
|
- // decimal NotHelpCreditProfitStandardRate = 0;
|
|
|
- // decimal NotHelpCreditAddOrSubRate = 0;
|
|
|
- // decimal HelpCreditTradeAmt = 0;
|
|
|
- // decimal NonQrCreditTradeProfit = 0;
|
|
|
- // decimal HelpCreditTradeProfit = 0;
|
|
|
- // decimal HelpCreditProfitRate = 0;
|
|
|
- // decimal HelpCreditProfitStandardRate = 0;
|
|
|
- // decimal HelpCreditAddOrSubRate = 0;
|
|
|
- // decimal DebitNonCapTradeAmt = 0;
|
|
|
- // decimal DebitCapTradeAmt = 0;
|
|
|
- // decimal QrDebitNotCapTradeAmt = 0;
|
|
|
- // decimal NonQrDebitNotCapTradeAmt = 0;
|
|
|
- // decimal NotHelpDebitNonCapTradeAmt = 0;
|
|
|
- // decimal HelpDebitNonCapTradeAmt = 0;
|
|
|
- // decimal DebitNonTradeCapProfit = 0;
|
|
|
- // decimal QrDebitNonTradeCapProfit = 0;
|
|
|
- // decimal NonQrDebitNonTradeCapProfit = 0;
|
|
|
- // decimal NotHelpDebitNonTradeCapProfit = 0;
|
|
|
- // decimal HelpDebitNonTradeCapProfit = 0;
|
|
|
- // decimal DebitTradeCapProfit = 0;
|
|
|
- // decimal NotHelpDebitProfitRate = 0;
|
|
|
- // decimal NotHelpDebitProfitStandardRate = 0;
|
|
|
- // decimal NotHelpDebitAddOrSubRate = 0;
|
|
|
- // decimal HelpDebitProfitRate = 0;
|
|
|
- // decimal HelpDebitProfitStandardRate = 0;
|
|
|
- // decimal HelpDebitAddOrSubRate = 0;
|
|
|
- // decimal DebitCapSingleReward = 0;
|
|
|
- // decimal QrDebitProfitRate = 0;
|
|
|
- // decimal QrDebitProfitStandardRate = 0;
|
|
|
- // decimal QrDebitAddOrSubRate = 0;
|
|
|
- // if (j == 1)
|
|
|
- // {
|
|
|
- // CreditTradeAmt = TradeAmt; //贷记卡交易总金额
|
|
|
- // CreditTradeProfit = ProfitAmt; //贷记卡分润总金额
|
|
|
- // if (sub.QrPayFlag == 1)
|
|
|
- // {
|
|
|
- // QrCreditTradeAmt = TradeAmt; //(云闪付)贷记卡交易总金额
|
|
|
- // QrCreditProfitRate = ProfitRate; //(云闪付)贷记卡交易分润比例
|
|
|
- // QrCreditTradeProfit = ProfitAmt; //(云闪付)贷记卡交易分润
|
|
|
- // }
|
|
|
- // else
|
|
|
- // {
|
|
|
- // NonQrCreditTradeAmt = TradeAmt; //(非云闪付)贷记卡交易总金额
|
|
|
- // NonQrCreditTradeProfit = ProfitAmt; //(非云闪付)贷记卡交易分润
|
|
|
- // if(sub.HelpFlag == 1)
|
|
|
- // {
|
|
|
- // HelpCreditTradeProfit = ProfitAmt; //(扶持期)(非云闪付)贷记卡分润总金额
|
|
|
- // HelpCreditProfitRate = ProfitRate; //(扶持期)(非云闪付)贷记卡商户交易对应分润比例
|
|
|
- // HelpCreditTradeAmt = TradeAmt; //(扶持期)(非云闪付)贷记卡交易总金额
|
|
|
- // }
|
|
|
- // else
|
|
|
- // {
|
|
|
- // NotHelpCreditTradeAmt = TradeAmt; //(非扶持期)(非云闪付)贷记卡交易总金额
|
|
|
- // NotHelpCreditTradeProfit = ProfitAmt; //(非扶持期)(非云闪付)贷记卡分润总金额
|
|
|
- // NotHelpCreditProfitRate = ProfitRate; //(非扶持期)(非云闪付)贷记卡商户交易对应分润比例
|
|
|
- // }
|
|
|
- // }
|
|
|
- // }
|
|
|
- // if (j == 0)
|
|
|
- // {
|
|
|
- // if (sub.Money < 1)
|
|
|
- // {
|
|
|
- // DebitNonCapTradeAmt = TradeAmt; //商户非封顶借记卡交易总额
|
|
|
- // DebitNonTradeCapProfit = ProfitAmt; //借记卡非封顶交易分润总金额
|
|
|
- // }
|
|
|
- // else
|
|
|
- // {
|
|
|
- // DebitCapTradeAmt = TradeAmt; //商户借记卡封顶交易总额
|
|
|
- // DebitCapSingleReward = ProfitAmt; //借记卡合伙人直营封顶交易奖励金额
|
|
|
- // DebitTradeCapProfit = ProfitAmt; //借记卡封顶交易分润总金额
|
|
|
- // }
|
|
|
- // if (sub.QrPayFlag == 1)
|
|
|
- // {
|
|
|
- // if (sub.Money < 1)
|
|
|
- // {
|
|
|
- // QrDebitNotCapTradeAmt = TradeAmt; //(云闪付)商户非封顶借记卡交易总额
|
|
|
- // QrDebitProfitRate = ProfitRate; //(云闪付)借记卡非封顶交易分润比例
|
|
|
- // QrDebitNonTradeCapProfit = ProfitAmt; //(云闪付)借记卡非封顶交易分润总金额
|
|
|
- // }
|
|
|
- // }
|
|
|
- // else
|
|
|
- // {
|
|
|
- // if (sub.Money < 1)
|
|
|
- // {
|
|
|
- // NonQrDebitNonTradeCapProfit = ProfitAmt; //(非云闪付)借记卡非封顶交易分润总金额
|
|
|
- // NonQrDebitNotCapTradeAmt = TradeAmt; //(非云闪付)商户非封顶借记卡交易总额
|
|
|
- // }
|
|
|
- // if (sub.HelpFlag == 1)
|
|
|
- // {
|
|
|
- // if (sub.Money < 1)
|
|
|
- // {
|
|
|
- // HelpDebitNonCapTradeAmt = TradeAmt; //(扶持期)(非云闪付)借记卡非封顶交易总金额
|
|
|
- // HelpDebitNonTradeCapProfit = ProfitAmt; //(扶持期)(非云闪付)借记卡非封顶交易分润总金额
|
|
|
- // }
|
|
|
- // HelpDebitProfitRate = ProfitRate; //(扶持期)(非云闪付)借记卡商户交易对应分润比例
|
|
|
- // }
|
|
|
- // else
|
|
|
- // {
|
|
|
- // if (sub.Money < 1)
|
|
|
- // {
|
|
|
- // NotHelpDebitNonCapTradeAmt = TradeAmt; //(非扶持期)(非云闪付)借记卡非封顶交易总金额
|
|
|
- // NotHelpDebitNonTradeCapProfit = ProfitAmt; //(非扶持期)(非云闪付)借记卡非封顶交易分润总金额
|
|
|
- // }
|
|
|
- // NotHelpDebitProfitRate = ProfitRate; //(非扶持期)(非云闪付)借记卡商户交易对应分润比例
|
|
|
- // }
|
|
|
- // }
|
|
|
- // }
|
|
|
- // db.ProfitRewardRecord.Add(new ProfitRewardRecord()
|
|
|
- // {
|
|
|
- // CreateDate = DateTime.Now,
|
|
|
- // UpdateDate = DateTime.Now,
|
|
|
- // UserId = sub.UserId, //创客
|
|
|
- // MerchantId = sub.MerchantId, //商户
|
|
|
- // BrandId = sub.BrandId, //品牌
|
|
|
- // ProfitType = sub.DirectFlag, //创客分润类型
|
|
|
- // TradeAmt = sub.TradeAmount, //商户交易总额
|
|
|
- // TradeProfit = sub.Money, //交易分润
|
|
|
- // TradeMonth = Month, //交易月
|
|
|
- // RecordNo = RecordNo, //记录单号
|
|
|
- // TopUserId = TopUserId, //顶级创客
|
|
|
- // CreditTradeAmt = CreditTradeAmt, //贷记卡交易总金额
|
|
|
- // QrCreditTradeAmt = QrCreditTradeAmt, //(云闪付)贷记卡交易总金额
|
|
|
- // NonQrCreditTradeAmt = NonQrCreditTradeAmt, //(非云闪付)贷记卡交易总金额
|
|
|
- // NotHelpCreditTradeAmt = NotHelpCreditTradeAmt, //(非扶持期)(非云闪付)贷记卡交易总金额
|
|
|
- // HelpCreditTradeAmt = HelpCreditTradeAmt, //(扶持期)(非云闪付)贷记卡交易总金额
|
|
|
- // DebitNonCapTradeAmt = DebitNonCapTradeAmt, //商户非封顶借记卡交易总额
|
|
|
- // QrDebitNotCapTradeAmt = QrDebitNotCapTradeAmt, //(云闪付)商户非封顶借记卡交易总额
|
|
|
- // NonQrDebitNotCapTradeAmt = NonQrDebitNotCapTradeAmt, //(非云闪付)商户非封顶借记卡交易总额
|
|
|
- // NotHelpDebitNonCapTradeAmt = NotHelpDebitNonCapTradeAmt, //(非扶持期)(非云闪付)借记卡非封顶交易总金额
|
|
|
- // HelpDebitNonCapTradeAmt = HelpDebitNonCapTradeAmt, //(扶持期)(非云闪付)借记卡非封顶交易总金额
|
|
|
- // DebitCapTradeAmt = DebitCapTradeAmt, //商户借记卡封顶交易总额
|
|
|
- // CreditTradeProfit = CreditTradeProfit, //贷记卡分润总金额
|
|
|
- // QrCreditTradeProfit = QrCreditTradeProfit, //(云闪付)贷记卡交易分润
|
|
|
- // NonQrCreditTradeProfit = NonQrCreditTradeProfit, //(非云闪付)贷记卡交易分润
|
|
|
- // NotHelpCreditTradeProfit = NotHelpCreditTradeProfit, //(非扶持期)(非云闪付)贷记卡分润总金额
|
|
|
- // HelpCreditTradeProfit = HelpCreditTradeProfit, //(扶持期)(非云闪付)贷记卡分润总金额
|
|
|
- // DebitNonTradeCapProfit = DebitNonTradeCapProfit, //借记卡非封顶交易分润总金额
|
|
|
- // QrDebitNonTradeCapProfit = QrDebitNonTradeCapProfit, //(云闪付)借记卡非封顶交易分润总金额
|
|
|
- // NonQrDebitNonTradeCapProfit = NonQrDebitNonTradeCapProfit, //(非云闪付)借记卡非封顶交易分润总金额
|
|
|
- // NotHelpDebitNonTradeCapProfit = NotHelpDebitNonTradeCapProfit, //(非扶持期)(非云闪付)借记卡非封顶交易分润总金额
|
|
|
- // HelpDebitNonTradeCapProfit = HelpDebitNonTradeCapProfit, //(扶持期)(非云闪付)借记卡非封顶交易分润总金额
|
|
|
- // DebitTradeCapProfit = DebitTradeCapProfit, //借记卡封顶交易分润总金额
|
|
|
- // NotHelpCreditProfitRate = NotHelpCreditProfitRate, //(非扶持期)(非云闪付)贷记卡商户交易对应分润比例
|
|
|
- // NotHelpCreditProfitStandardRate = NotHelpCreditProfitStandardRate, //(非扶持期)(非云闪付)贷记卡标准分润比例
|
|
|
- // NotHelpCreditAddOrSubRate = NotHelpCreditAddOrSubRate, //(非扶持期)(非云闪付)贷记卡成本或增或减比例
|
|
|
- // HelpCreditProfitRate = HelpCreditProfitRate, //(扶持期)(非云闪付)贷记卡商户交易对应分润比例
|
|
|
- // HelpCreditProfitStandardRate = HelpCreditProfitStandardRate, //(扶持期)(非云闪付)贷记卡-标准分润比例
|
|
|
- // HelpCreditAddOrSubRate = HelpCreditAddOrSubRate, //(扶持期)(非云闪付)贷记卡成本或增或减比例
|
|
|
- // NotHelpDebitProfitRate = NotHelpDebitProfitRate, //(非扶持期)(非云闪付)借记卡商户交易对应分润比例
|
|
|
- // NotHelpDebitProfitStandardRate = NotHelpDebitProfitStandardRate, //(非扶持期)(非云闪付)借记卡标准分润比例
|
|
|
- // NotHelpDebitAddOrSubRate = NotHelpDebitAddOrSubRate, //(非扶持期)(非云闪付)借记卡成本或增或减比例
|
|
|
- // HelpDebitProfitRate = HelpDebitProfitRate, //(扶持期)(非云闪付)借记卡商户交易对应分润比例
|
|
|
- // HelpDebitProfitStandardRate = HelpDebitProfitStandardRate, //(扶持期)(非云闪付)借记卡-标准分润比例
|
|
|
- // HelpDebitAddOrSubRate = HelpDebitAddOrSubRate, //(扶持期)(非云闪付)借记卡成本或增或减比例
|
|
|
- // DebitCapSingleReward = DebitCapSingleReward, //借记卡合伙人直营封顶交易奖励金额
|
|
|
- // QrCreditProfitRate = QrCreditProfitRate, //(云闪付)贷记卡交易分润比例
|
|
|
- // QrCreditProfitStandardRate = QrCreditProfitStandardRate, //(云闪付)贷记卡分润基准
|
|
|
- // QrCreditAddOrSubRate = QrCreditAddOrSubRate, //(云闪付)贷记卡分润比例或增或减
|
|
|
- // QrDebitProfitRate = QrDebitProfitRate, //(云闪付)借记卡非封顶交易分润比例
|
|
|
- // QrDebitProfitStandardRate = QrDebitProfitStandardRate, //(云闪付)借记卡非封顶交易分润基准
|
|
|
- // QrDebitAddOrSubRate = QrDebitAddOrSubRate, //(云闪付)借记卡非封顶交易分润比例或增或减
|
|
|
- // });
|
|
|
- // }
|
|
|
}
|
|
|
db.SaveChanges();
|
|
|
PageNum += 1;
|
|
@@ -2123,11 +1947,7 @@ namespace MySystem
|
|
|
DataTable dt = new DataTable();
|
|
|
if (BankCardType == 1)
|
|
|
{
|
|
|
- dt = dbconn.dtable("select SnNo,UserId,QrPayFlag,MerHelpFlag,sum(TradeAmount) from TradeRecord where Id>2030000 and CreateDate>='" + start + "' and CreateDate<'" + end + "' and BankCardType!=0 and BrandId=" + BrandId + " group by SnNo,UserId,QrPayFlag,MerHelpFlag" + LimitString);
|
|
|
- }
|
|
|
- if (BankCardType == 0)
|
|
|
- {
|
|
|
- dt = dbconn.dtable("select SnNo,UserId,QrPayFlag,MerHelpFlag,TradeAmount from TradeRecord where Id>2030000 and CreateDate>='" + start + "' and CreateDate<'" + end + "' and BankCardType=0 and BrandId=" + BrandId + LimitString);
|
|
|
+ dt = ProfitHelperV2.Instance.GetDataTable("select SnNo,UserId,QrPayFlag,MerHelpFlag,TradeAmount TradeAmount from TradeRecord" + Month + " where BrandId=" + BrandId);
|
|
|
}
|
|
|
function.WriteLog("记录条数:" + dt.Rows.Count.ToString(), "老规则分润日志");
|
|
|
foreach (DataRow dr in dt.Rows)
|
|
@@ -2146,37 +1966,10 @@ namespace MySystem
|
|
|
int QrPayFlag = int.Parse(dr["QrPayFlag"].ToString());
|
|
|
decimal TradeAmt = decimal.Parse(dr[4].ToString());
|
|
|
List<UserLevelSet> levels = dbnew.UserLevelSet.ToList();
|
|
|
- Users selfUser = dbnew.Users.FirstOrDefault(m => m.Id == UserId) ?? new Users();
|
|
|
+ SubUser selfUser = ProfitHelperV2.Instance.GetUser(UserId, Month) ?? new SubUser();
|
|
|
int Days = int.Parse(RedisDbconn.Instance.Get<string>("pobjrule:" + BrandId + ":HelpPolicy:Days")); //天数
|
|
|
if (BankCardType == 0)
|
|
|
{
|
|
|
- int UserLevel = selfUser.UserLevel; //当前会员等级
|
|
|
- // int HelpTime = 0; //扶持期-1,稳定期=0
|
|
|
- // if (pos.BindingTime.Value.AddDays(Days) > DateTime.Now && Deposit > 0 && pos.ActivationState == 1)
|
|
|
- // {
|
|
|
- // HelpTime = 1;
|
|
|
- // }
|
|
|
- // int LevelKindId = GetLevelKindId(BrandId, HelpTime, 0);
|
|
|
- // ProfitObjectLevels objlevel = RedisDbconn.Instance.Get<ProfitObjectLevels>("pobjlv" + LevelKindId + ":" + UserLevel); //获取当前等级参数
|
|
|
- decimal getLevelProfit = TradeAmt * 0.0006M;
|
|
|
- if (getLevelProfit > 1) getLevelProfit = 1;
|
|
|
- result.Add(new ProfitResult()
|
|
|
- {
|
|
|
- UserId = selfUser.Id,
|
|
|
- UserNav = selfUser.ParentNav,
|
|
|
- Money = PublicFunction.NumberFormat(getLevelProfit),
|
|
|
- ProfitRate = 0.0006M,
|
|
|
- Message = "储蓄卡分润",
|
|
|
- BankCardType = BankCardType,
|
|
|
- QrPayFlag = QrPayFlag,
|
|
|
- BrandId = pos.BrandId,
|
|
|
- DirectFlag = 1,
|
|
|
- IsSubsidy = 0,
|
|
|
- MerchantId = pos.BindMerchantId,
|
|
|
- TradeAmount = TradeAmt,
|
|
|
- HelpFlag = HelpTime,
|
|
|
- PosSn = pos.PosSn,
|
|
|
- });
|
|
|
}
|
|
|
else
|
|
|
{
|
|
@@ -2184,15 +1977,6 @@ namespace MySystem
|
|
|
decimal diffLevelProfit = 0; //等级级差
|
|
|
int curLevel = 0; //当前层级的会员等级
|
|
|
string ParentNav = selfUser.ParentNav;
|
|
|
- // if (UserId != pos.UserId)
|
|
|
- // {
|
|
|
- // Users user = dbnew.Users.FirstOrDefault(m => m.Id == pos.UserId);
|
|
|
- // if (user != null)
|
|
|
- // {
|
|
|
- // ParentNav = user.ParentNav;
|
|
|
- // UserId = pos.UserId;
|
|
|
- // }
|
|
|
- // }
|
|
|
if (string.IsNullOrEmpty(ParentNav) && pos.BuyUserId == 1 && pos.UserId == 1)
|
|
|
{
|
|
|
ParentNav = ",0,";
|
|
@@ -2209,27 +1993,14 @@ namespace MySystem
|
|
|
{
|
|
|
level += 1;
|
|
|
int uid = int.Parse(UserIdString);
|
|
|
- Users user = dbnew.Users.FirstOrDefault(m => m.Id == uid) ?? new Users();
|
|
|
- int UserLevel = user.UserLevel; //当前会员等级
|
|
|
- UserRankWhite rank = dbnew.UserRankWhite.FirstOrDefault(m => m.Id == user.Id && m.CreateDate < ThisMonth && m.UpdateDate > ThisMonth);
|
|
|
- if (rank != null)
|
|
|
- {
|
|
|
- if (rank.Rank > UserLevel)
|
|
|
- {
|
|
|
- UserLevel = rank.Rank;
|
|
|
- }
|
|
|
- }
|
|
|
+ SubUser user = ProfitHelperV2.Instance.GetUser(uid, Month) ?? new SubUser();
|
|
|
+ int UserLevel = user.PreUserLevel > user.UserLevel ? user.PreUserLevel : user.UserLevel; //当前会员等级
|
|
|
if (curLevel == maxLevel) //判断当前创客是否有直推的激活机具,并且在活动时间内
|
|
|
{
|
|
|
break;
|
|
|
}
|
|
|
if (UserLevel <= maxLevel && UserLevel > curLevel)
|
|
|
{
|
|
|
- // int HelpTime = 0; //扶持期-1,稳定期=0
|
|
|
- // if (pos.BindingTime.Value.AddDays(Days) > DateTime.Now && Deposit > 0 && pos.ActivationState == 1)
|
|
|
- // {
|
|
|
- // HelpTime = 1;
|
|
|
- // }
|
|
|
int LevelKindId = GetLevelKindId(BrandId, HelpTime, 1);
|
|
|
ProfitObjectLevels objlevel = RedisDbconn.Instance.Get<ProfitObjectLevels>("pobjlv" + LevelKindId + ":" + UserLevel); //获取当前等级参数
|
|
|
if (objlevel != null)
|
|
@@ -2250,70 +2021,39 @@ namespace MySystem
|
|
|
{
|
|
|
diffLevelProfit = money;
|
|
|
}
|
|
|
- if (getLevelProfit >= obj.MinProfitVal)
|
|
|
- {
|
|
|
- result.Add(new ProfitResult()
|
|
|
- {
|
|
|
- UserId = user.Id,
|
|
|
- UserNav = user.ParentNav,
|
|
|
- Money = PublicFunction.NumberFormat(getLevelProfit),
|
|
|
- ProfitRate = objlevel.Percents,
|
|
|
- Message = "交易分润",
|
|
|
- BankCardType = BankCardType,
|
|
|
- QrPayFlag = QrPayFlag,
|
|
|
- DirectFlag = selfUser.Id == user.Id ? 1 : 0,
|
|
|
- BrandId = pos.BrandId,
|
|
|
- IsSubsidy = 0,
|
|
|
- MerchantId = pos.BindMerchantId,
|
|
|
- TradeAmount = TradeAmt,
|
|
|
- HelpFlag = HelpTime,
|
|
|
- PosSn = pos.PosSn,
|
|
|
- });
|
|
|
- }
|
|
|
|
|
|
// 分润补贴
|
|
|
if (HelpTime == 1 && level == 1)
|
|
|
{
|
|
|
int SubsidyUserId = pos.BuyUserId;
|
|
|
- Users subuser = dbnew.Users.FirstOrDefault(m => m.Id == SubsidyUserId) ?? new Users();
|
|
|
- int subUserLevel = subuser.UserLevel;
|
|
|
+ SubUser subuser = ProfitHelperV2.Instance.GetUser(SubsidyUserId, Month) ?? new SubUser();
|
|
|
+ int subUserLevel = subuser.PreUserLevel > subuser.UserLevel ? subuser.PreUserLevel : subuser.UserLevel;
|
|
|
if(subUserLevel < 5)
|
|
|
{
|
|
|
- UserRankWhite subrank = dbnew.UserRankWhite.FirstOrDefault(m => m.Id == subuser.Id && m.CreateDate < ThisMonth && m.UpdateDate > ThisMonth);
|
|
|
- if (subrank != null)
|
|
|
- {
|
|
|
- if (subrank.Rank > subUserLevel)
|
|
|
- {
|
|
|
- subUserLevel = subrank.Rank;
|
|
|
- }
|
|
|
- }
|
|
|
- if(subUserLevel < 5)
|
|
|
+ ProfitObjectLevels sublevel = RedisDbconn.Instance.Get<ProfitObjectLevels>("pobjlv" + LevelKindId + ":" + subUserLevel); //获取当前等级参数
|
|
|
+ if (sublevel != null)
|
|
|
{
|
|
|
- ProfitObjectLevels sublevel = RedisDbconn.Instance.Get<ProfitObjectLevels>("pobjlv" + LevelKindId + ":" + subUserLevel); //获取当前等级参数
|
|
|
- if (sublevel != null)
|
|
|
+ decimal otherPercent = 0.001M - sublevel.Percents;
|
|
|
+ decimal otherMoney = TradeAmt * otherPercent;
|
|
|
+ if (otherMoney >= obj.MinProfitVal)
|
|
|
{
|
|
|
- decimal otherPercent = 0.001M - sublevel.Percents;
|
|
|
- decimal otherMoney = TradeAmt * otherPercent;
|
|
|
- if (otherMoney >= obj.MinProfitVal)
|
|
|
+ result.Add(new ProfitResult()
|
|
|
{
|
|
|
- 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,
|
|
|
- });
|
|
|
- }
|
|
|
+ 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,
|
|
|
+ });
|
|
|
}
|
|
|
}
|
|
|
}
|