From 371730664c0ad151890b42d338fc0c3b9e2c7ca8 Mon Sep 17 00:00:00 2001 From: huangjiajun <582604932@qq.com> Date: Mon, 25 Jul 2022 16:52:53 +0800 Subject: [PATCH] =?UTF-8?q?add=20reverse:for=20v1.5.4=20=E5=85=AC=E6=8E=92?= =?UTF-8?q?=E8=BF=94=E7=A7=AF=E5=88=86=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- svc/public_platoon_relate_commission.go | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/svc/public_platoon_relate_commission.go b/svc/public_platoon_relate_commission.go index 94248c3..b161a78 100644 --- a/svc/public_platoon_relate_commission.go +++ b/svc/public_platoon_relate_commission.go @@ -58,12 +58,15 @@ func BatchGetPublicPlatoonRelateCommissionByOrder(engine *xorm.Engine, masterId var directPush = make(map[string]string) var selfRateList = make(map[string]string) var commonWealthSystem = make(map[string]string) + var pendingAmount = param.PendingAmount for _, coinId := range lvGrade.ReturnType { - selfRateList[coinId] = zhios_order_relate_utils.Float64ToStrPrec4(zhios_order_relate_utils.StrToFloat64(lvGrade.SelfRateList[coinId]) * zhios_order_relate_utils.StrToFloat64(param.PendingAmount) / 100) - commonWealthSystem[coinId] = zhios_order_relate_utils.Float64ToStrPrec4(zhios_order_relate_utils.StrToFloat64(lvGrade.CommonWealthSystem[coinId]) * zhios_order_relate_utils.StrToFloat64(param.PendingAmount) / 100) - directPush[coinId] = zhios_order_relate_utils.Float64ToStrPrec4(zhios_order_relate_utils.StrToFloat64(lvGrade.DirectPush[coinId]) * zhios_order_relate_utils.StrToFloat64(param.PendingAmount) / 100) + if zhios_order_relate_utils.StrToInt(coinId) > 0 { //积分更换基数 + pendingAmount = param.PendingIntegral + } + selfRateList[coinId] = zhios_order_relate_utils.Float64ToStr(zhios_order_relate_utils.StrToFloat64(lvGrade.SelfRateList[coinId]) * zhios_order_relate_utils.StrToFloat64(pendingAmount) / 100) + commonWealthSystem[coinId] = zhios_order_relate_utils.Float64ToStr(zhios_order_relate_utils.StrToFloat64(lvGrade.CommonWealthSystem[coinId]) * zhios_order_relate_utils.StrToFloat64(pendingAmount) / 100) + directPush[coinId] = zhios_order_relate_utils.Float64ToStr(zhios_order_relate_utils.StrToFloat64(lvGrade.DirectPush[coinId]) * zhios_order_relate_utils.StrToFloat64(pendingAmount) / 100) } - //TODO::本次消费产生的共富收益给到谁 var nowBenefitUid string userPublicPlatoonRelation, err := db.UserPublicPlatoonRelationGetOneByParams(engine, map[string]interface{}{ @@ -118,6 +121,7 @@ func BatchGetPublicPlatoonRelateCommissionByOrder(engine *xorm.Engine, masterId CommonWealthBenefitUid: nowBenefitUid, DirectPushBenefitUid: strconv.Itoa(userPublicPlatoonRelation.RecommendUid), PendingAmount: param.PendingAmount, + PendingIntegral: param.PendingIntegral, Oid: param.Oid, SelfRateList: selfRateList, CommonWealthSystem: commonWealthSystem,