@@ -22,7 +22,11 @@ func CalcAllMorePercentage(opt *PlanOpt, totalAmt, integralTotalAmt float64, use | |||||
ratioListMap := convertList2Map(ratioList) | ratioListMap := convertList2Map(ratioList) | ||||
for k, v := range userList.ProfitList { | for k, v := range userList.ProfitList { | ||||
userList.ProfitList[k].Val = ratioListMap[v.Cid] * v.Val | |||||
if v.Cid == "0" { | |||||
userList.ProfitList[k].Val = v.Val | |||||
} else { | |||||
userList.ProfitList[k].Val = ratioListMap[v.Cid] * v.Val | |||||
} | |||||
} | } | ||||
// 各种币换算出总的额度 | // 各种币换算出总的额度 | ||||
totalAmtList := make([]*VirtualCoinCommission, 0) | totalAmtList := make([]*VirtualCoinCommission, 0) | ||||
@@ -973,7 +973,11 @@ func CalcCommission(uid, level, oldDiff, ownbuyReturnType int, fee, integralFee | |||||
ratioListMap := convertList2Map(ratioList) | ratioListMap := convertList2Map(ratioList) | ||||
for k, v := range amountList { | for k, v := range amountList { | ||||
amountList[k].Val = ratioListMap[v.Cid] * v.Val | |||||
if v.Cid == "0" { | |||||
amountList[k].Val = v.Val | |||||
} else { | |||||
amountList[k].Val = ratioListMap[v.Cid] * v.Val | |||||
} | |||||
} | } | ||||
//重新计算佣金 | //重新计算佣金 | ||||
return pvdFee, sysFee, subsidyFee, &comm_plan.LvUser{ProfitBili: profitBili, FirstFee: feeFirst, IntegralFirstFee: integralFeeFirst, TikTokOwnSubsidyFeeList: tikTokSubsidyFeeList, OwnSubsidyFeeList: subsidyFeeList, Uid: uid, Lv: level, OldDiff: oldDiff, Profit: commission, ProfitList: amountList, Diff: 0}, nil | return pvdFee, sysFee, subsidyFee, &comm_plan.LvUser{ProfitBili: profitBili, FirstFee: feeFirst, IntegralFirstFee: integralFeeFirst, TikTokOwnSubsidyFeeList: tikTokSubsidyFeeList, OwnSubsidyFeeList: subsidyFeeList, Uid: uid, Lv: level, OldDiff: oldDiff, Profit: commission, ProfitList: amountList, Diff: 0}, nil | ||||