|
@@ -536,6 +536,9 @@ func CalcCommission(uid, level, oldDiff, ownbuyReturnType int, fee, integralFee |
|
|
if opt.Mode == "lv_winery" { |
|
|
if opt.Mode == "lv_winery" { |
|
|
commission, _, amountList, ratioList = comm_plan.CalReturnAmountAndRatioToWinery(level, fee, integralFee, opt) |
|
|
commission, _, amountList, ratioList = comm_plan.CalReturnAmountAndRatioToWinery(level, fee, integralFee, opt) |
|
|
} |
|
|
} |
|
|
|
|
|
if opt.Mode == "lv_ds_check" { |
|
|
|
|
|
commission, _, amountList, ratioList = comm_plan.CalReturnAmountAndRatioDsOwn(level, ownbuyReturnType, 0, "own", fee, integralFee, opt) |
|
|
|
|
|
} |
|
|
ratioListMap := convertList2Map(ratioList) |
|
|
ratioListMap := convertList2Map(ratioList) |
|
|
for k, v := range amountList { |
|
|
for k, v := range amountList { |
|
|
amountList[k].Val = ratioListMap[v.Cid] * v.Val |
|
|
amountList[k].Val = ratioListMap[v.Cid] * v.Val |
|
|