From 634f5e4bf12ec2f6333fb762c0a1e410361e14f4 Mon Sep 17 00:00:00 2001 From: huangjiajun <582604932@qq.com> Date: Sat, 2 Mar 2024 16:02:08 +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 --- svc/small_public_platoon_relate_commission.go | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/svc/small_public_platoon_relate_commission.go b/svc/small_public_platoon_relate_commission.go index 027368e..137f189 100644 --- a/svc/small_public_platoon_relate_commission.go +++ b/svc/small_public_platoon_relate_commission.go @@ -429,16 +429,19 @@ func BatchSmallGetPublicPlatoonRelateCommissionLevel(engine *xorm.Engine, master //共富简历 if zhios_order_relate_utils.StrToInt(nowBenefitUid) > 0 { parentUid, _ := db.UserFindByID(engine, nowBenefitUid) - lvGrade := subsidyTmp[zhios_order_relate_utils.IntToStr(parentUid.Level)] - if lvGrade != nil { - for _, coinId := range lvGrade.ReturnType { - var pendingAmount = param.PendingAmount - if zhios_order_relate_utils.StrToInt(coinId) > 0 { //积分更换基数 - pendingAmount = param.PendingIntegral + if parentUid != nil { + lvGrade := subsidyTmp[zhios_order_relate_utils.IntToStr(parentUid.Level)] + if lvGrade != nil { + for _, coinId := range lvGrade.ReturnType { + var pendingAmount = param.PendingAmount + if zhios_order_relate_utils.StrToInt(coinId) > 0 { //积分更换基数 + pendingAmount = param.PendingIntegral + } + commonWealthSystem[coinId] = zhios_order_relate_utils.Float64ToStrByPrec(zhios_order_relate_utils.StrToFloat64(lvGrade.CommonWealthSystem[coinId])*zhios_order_relate_utils.StrToFloat64(pendingAmount)/100, 9) } - commonWealthSystem[coinId] = zhios_order_relate_utils.Float64ToStrByPrec(zhios_order_relate_utils.StrToFloat64(lvGrade.CommonWealthSystem[coinId])*zhios_order_relate_utils.StrToFloat64(pendingAmount)/100, 9) } } + } resp[param.Oid] = &md.SmallPublicPlatoonRelateCommissionResp{