From c91a4fd2ae882f12e14250cc65e2e341ab5e5aea Mon Sep 17 00:00:00 2001 From: huangjiajun <582604932@qq.com> Date: Fri, 23 Feb 2024 19:15:33 +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/public_platoon_relate_commission.go | 12 ++++++------ svc/small_public_platoon_relate_commission.go | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/svc/public_platoon_relate_commission.go b/svc/public_platoon_relate_commission.go index 16e6f6b..be2b611 100644 --- a/svc/public_platoon_relate_commission.go +++ b/svc/public_platoon_relate_commission.go @@ -56,9 +56,9 @@ func BatchGetPublicPlatoonRelateCommissionByOrder(engine *xorm.Engine, masterId 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) + selfRateList[coinId] = zhios_order_relate_utils.Float64ToStrByPrec(zhios_order_relate_utils.StrToFloat64(lvGrade.SelfRateList[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) + directPush[coinId] = zhios_order_relate_utils.Float64ToStrByPrec(zhios_order_relate_utils.StrToFloat64(lvGrade.DirectPush[coinId])*zhios_order_relate_utils.StrToFloat64(pendingAmount)/100, 9) } } nowBenefitUid, _, err := benefitUidByBig(engine, param) @@ -187,7 +187,7 @@ func BatchGetPublicPlatoonRelateCommissionByOrderLevel(engine *xorm.Engine, mast 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) + selfRateList[coinId] = zhios_order_relate_utils.Float64ToStrByPrec(zhios_order_relate_utils.StrToFloat64(lvGrade.SelfRateList[coinId])*zhios_order_relate_utils.StrToFloat64(pendingAmount)/100, 9) } } nowBenefitUid, _, err := benefitUidByBig(engine, param) @@ -209,7 +209,7 @@ func BatchGetPublicPlatoonRelateCommissionByOrderLevel(engine *xorm.Engine, mast if zhios_order_relate_utils.StrToInt(coinId) > 0 { //积分更换基数 pendingAmount = param.PendingIntegral } - directPush[coinId] = zhios_order_relate_utils.Float64ToStr(zhios_order_relate_utils.StrToFloat64(lvGrade.DirectPush[coinId]) * zhios_order_relate_utils.StrToFloat64(pendingAmount) / 100) + directPush[coinId] = zhios_order_relate_utils.Float64ToStrByPrec(zhios_order_relate_utils.StrToFloat64(lvGrade.DirectPush[coinId])*zhios_order_relate_utils.StrToFloat64(pendingAmount)/100, 9) } } } @@ -223,7 +223,7 @@ func BatchGetPublicPlatoonRelateCommissionByOrderLevel(engine *xorm.Engine, mast if zhios_order_relate_utils.StrToInt(coinId) > 0 { //积分更换基数 pendingAmount = param.PendingIntegral } - commonWealthSystem[coinId] = zhios_order_relate_utils.Float64ToStr(zhios_order_relate_utils.StrToFloat64(lvGrade.CommonWealthSystem[coinId]) * zhios_order_relate_utils.StrToFloat64(pendingAmount) / 100) + commonWealthSystem[coinId] = zhios_order_relate_utils.Float64ToStrByPrec(zhios_order_relate_utils.StrToFloat64(lvGrade.CommonWealthSystem[coinId])*zhios_order_relate_utils.StrToFloat64(pendingAmount)/100, 9) } } } diff --git a/svc/small_public_platoon_relate_commission.go b/svc/small_public_platoon_relate_commission.go index 1a33d46..027368e 100644 --- a/svc/small_public_platoon_relate_commission.go +++ b/svc/small_public_platoon_relate_commission.go @@ -58,9 +58,9 @@ func BatchSmallGetPublicPlatoonRelateCommission(engine *xorm.Engine, masterId st 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) + selfRateList[coinId] = zhios_order_relate_utils.Float64ToStrByPrec(zhios_order_relate_utils.StrToFloat64(lvGrade.SelfRateList[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) + directPush[coinId] = zhios_order_relate_utils.Float64ToStrByPrec(zhios_order_relate_utils.StrToFloat64(lvGrade.DirectPush[coinId])*zhios_order_relate_utils.StrToFloat64(pendingAmount)/100, 9) } } @@ -399,7 +399,7 @@ func BatchSmallGetPublicPlatoonRelateCommissionLevel(engine *xorm.Engine, master 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) + selfRateList[coinId] = zhios_order_relate_utils.Float64ToStrByPrec(zhios_order_relate_utils.StrToFloat64(lvGrade.SelfRateList[coinId])*zhios_order_relate_utils.StrToFloat64(pendingAmount)/100, 9) } } //TODO::本次消费产生的共富收益给到谁 @@ -422,7 +422,7 @@ func BatchSmallGetPublicPlatoonRelateCommissionLevel(engine *xorm.Engine, master if zhios_order_relate_utils.StrToInt(coinId) > 0 { //积分更换基数 pendingAmount = param.PendingIntegral } - directPush[coinId] = zhios_order_relate_utils.Float64ToStr(zhios_order_relate_utils.StrToFloat64(lvGrade.DirectPush[coinId]) * zhios_order_relate_utils.StrToFloat64(pendingAmount) / 100) + directPush[coinId] = zhios_order_relate_utils.Float64ToStrByPrec(zhios_order_relate_utils.StrToFloat64(lvGrade.DirectPush[coinId])*zhios_order_relate_utils.StrToFloat64(pendingAmount)/100, 9) } } } @@ -436,7 +436,7 @@ func BatchSmallGetPublicPlatoonRelateCommissionLevel(engine *xorm.Engine, master if zhios_order_relate_utils.StrToInt(coinId) > 0 { //积分更换基数 pendingAmount = param.PendingIntegral } - commonWealthSystem[coinId] = zhios_order_relate_utils.Float64ToStr(zhios_order_relate_utils.StrToFloat64(lvGrade.CommonWealthSystem[coinId]) * zhios_order_relate_utils.StrToFloat64(pendingAmount) / 100) + commonWealthSystem[coinId] = zhios_order_relate_utils.Float64ToStrByPrec(zhios_order_relate_utils.StrToFloat64(lvGrade.CommonWealthSystem[coinId])*zhios_order_relate_utils.StrToFloat64(pendingAmount)/100, 9) } } }