From 94098e8aad541026e827e33260b972210361ac09 Mon Sep 17 00:00:00 2001 From: huangjiajun <582604932@qq.com> Date: Sat, 4 Mar 2023 15:51:10 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/comm_plan/all.go | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/lib/comm_plan/all.go b/lib/comm_plan/all.go index 11ed35d..750c995 100644 --- a/lib/comm_plan/all.go +++ b/lib/comm_plan/all.go @@ -550,8 +550,18 @@ func subsidyFeeDo(opt *PlanOpt, totalAmt, integralTotalAmt float64, lvuser *LvUs return subsidyFee, subsidyRatio, isOnlySubsidyFee, subsidyFeeList, subsidyRatioList } if grade[lv].UserSubsidyType == "winery" { //酒庄模式 结算再管 - totalAmt = 0 - integralTotalAmt = 0 + 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 } subsidyFee, subsidyRatio, isOnlySubsidyFee, subsidyFeeList, subsidyRatioList = commSubsidy(opt, totalAmt, integralTotalAmt, lvuser, newLv, pvd, sysFee, integralSysFee, grade) return subsidyFee, subsidyRatio, isOnlySubsidyFee, subsidyFeeList, subsidyRatioList