|
|
@@ -23,7 +23,11 @@ func CalcWinery(opt *PlanOpt, totalAmt, integralTotalAmt float64, userList *LvUs |
|
|
|
userList.SubsidyFee = 0 |
|
|
|
ratioListMap := convertList2Map(ratioList) |
|
|
|
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 |
|
|
|
} |
|
|
|
} |
|
|
|
maxLvData, _ := db.UserLevelByID(eg, "2") |
|
|
|
// 各种币换算出总的额度 |
|
|
@@ -718,7 +722,7 @@ func CalReturnAmountAndRatioExtendWinery(level, ownbuyReturnType, peerNum int, u |
|
|
|
return commission, commissionRatio, amountList, ratioList |
|
|
|
} |
|
|
|
|
|
|
|
//公共处理下团队-上一层 (用于旧版的制度 只有佣金时) |
|
|
|
// 公共处理下团队-上一层 (用于旧版的制度 只有佣金时) |
|
|
|
func extendDiffMoney(profit float64, payMode, isOnlySubsidy int, totalAmt, restAmt, teamRatio, totalRatio, peerRate, subsidyFee, subsidyRatio float64) (float64, float64, float64, float64, bool) { |
|
|
|
//totalRatio += teamRatio |
|
|
|
//出现负数跳过 |
|
|
|