|
|
@@ -549,19 +549,9 @@ func subsidyFeeDo(opt *PlanOpt, totalAmt, integralTotalAmt float64, lvuser *LvUs |
|
|
|
if grade[lv] == nil { |
|
|
|
return subsidyFee, subsidyRatio, isOnlySubsidyFee, subsidyFeeList, subsidyRatioList |
|
|
|
} |
|
|
|
if grade[lv].UserSubsidyType == "winery" { //酒庄模式 换一下计算基数 |
|
|
|
commission := lvuser.Profit |
|
|
|
amountList := lvuser.ProfitList |
|
|
|
var baseMoney = commission |
|
|
|
if zhios_order_relate_utils.StrToInt(grade[lv].UserSubsidyBaseCoinId) > 0 { |
|
|
|
for _, v := range amountList { |
|
|
|
if v.Cid == grade[lv].UserSubsidyBaseCoinId { |
|
|
|
baseMoney = v.Val |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
totalAmt = baseMoney |
|
|
|
integralTotalAmt = baseMoney |
|
|
|
if grade[lv].UserSubsidyType == "winery" { //酒庄模式 结算再管 |
|
|
|
totalAmt = 0 |
|
|
|
integralTotalAmt = 0 |
|
|
|
} |
|
|
|
subsidyFee, subsidyRatio, isOnlySubsidyFee, subsidyFeeList, subsidyRatioList = commSubsidy(opt, totalAmt, integralTotalAmt, lvuser, newLv, pvd, sysFee, integralSysFee, grade) |
|
|
|
return subsidyFee, subsidyRatio, isOnlySubsidyFee, subsidyFeeList, subsidyRatioList |
|
|
@@ -660,8 +650,9 @@ func commSubsidy(opt *PlanOpt, totalAmt, integralTotalAmt float64, lvuser *LvUse |
|
|
|
} |
|
|
|
amount, subsidyRatio := GetSubsidyVirtualCoinAmount(ratio, moneyRate, modeStr, newAmt, newSysFee, subsidyMode) |
|
|
|
subsidyFeeList = append(subsidyFeeList, &VirtualCoinCommission{ |
|
|
|
Cid: coinId, |
|
|
|
Val: amount, |
|
|
|
Cid: coinId, |
|
|
|
Val: amount, |
|
|
|
Bili: subsidyRatio, |
|
|
|
}) |
|
|
|
subsidyRatioList = append(subsidyRatioList, &VirtualCoinCommission{ |
|
|
|
Cid: coinId, |
|
|
|