From e2610116c332c80e279c0a3bdb7117872beb2c74 Mon Sep 17 00:00:00 2001 From: huangjiajun <582604932@qq.com> Date: Wed, 29 Jun 2022 13:05:51 +0800 Subject: [PATCH] v1.0.8 --- lib/comm_plan/all.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/comm_plan/all.go b/lib/comm_plan/all.go index 88732b0..578f44a 100644 --- a/lib/comm_plan/all.go +++ b/lib/comm_plan/all.go @@ -394,6 +394,12 @@ func teamDiffMoneyV2(profitList []*VirtualCoinCommission, payMode, isOnlySubsidy func subsidyFeeDo(opt *PlanOpt, totalAmt, integralTotalAmt float64, lvuser *LvUser, newLv int, pvd string, sysFee, integralSysFee float64) (subsidyFee, subsidyRatio float64, isOnlySubsidyFee int, subsidyFeeList, subsidyRatioList []*VirtualCoinCommission) { grade := opt.UserRate lv := lvuser.Lv + if grade == nil { + return subsidyFee, subsidyRatio, isOnlySubsidyFee, subsidyFeeList, subsidyRatioList + } + if grade[lv] == nil { + return subsidyFee, subsidyRatio, isOnlySubsidyFee, subsidyFeeList, subsidyRatioList + } if grade[lv].UserSubsidyType == "winery" { //酒庄模式 换一下计算基数 commission := lvuser.Profit amountList := lvuser.ProfitList