|
|
@@ -556,13 +556,13 @@ func CalcCommission(uid, level, oldDiff, ownbuyReturnType int, fee, integralFee |
|
|
|
minProfit = commission |
|
|
|
minProfitList = amountList |
|
|
|
} else { |
|
|
|
commission, _, amountList, ratioList = comm_plan.CalReturnAmountAndRatioDsOwn(rmd.MinLevel, ownbuyReturnType, 0, "own", fee, integralFee, opt) |
|
|
|
ratioListMap := convertList2Map(ratioList) |
|
|
|
for k, v := range amountList { |
|
|
|
amountList[k].Val = ratioListMap[v.Cid] * v.Val |
|
|
|
commission1, _, amountList1, ratioList1 := comm_plan.CalReturnAmountAndRatioDsOwn(rmd.MinLevel, ownbuyReturnType, 0, "own", fee, integralFee, opt) |
|
|
|
ratioListMap1 := convertList2Map(ratioList1) |
|
|
|
for k, v := range amountList1 { |
|
|
|
amountList1[k].Val = ratioListMap1[v.Cid] * v.Val |
|
|
|
} |
|
|
|
minProfit = commission |
|
|
|
minProfitList = amountList |
|
|
|
minProfit = commission1 |
|
|
|
minProfitList = amountList1 |
|
|
|
} |
|
|
|
} |
|
|
|
//重新计算佣金 |
|
|
|