From f5a6804c61a9ab0f9f0eb6cda262b78dfb0ad9c6 Mon Sep 17 00:00:00 2001 From: huangjiajun <582604932@qq.com> Date: Mon, 28 Nov 2022 17:53:23 +0800 Subject: [PATCH] =?UTF-8?q?add=20reverse:for=20v4.1.0=20=E7=A7=AF=E5=88=86?= =?UTF-8?q?=E9=87=8A=E6=94=BE=E8=A7=84=E5=88=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- svc/reward_commission.go | 2 +- svc/svc_integral_release.go | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/svc/reward_commission.go b/svc/reward_commission.go index 7d3e3b9..db222d2 100644 --- a/svc/reward_commission.go +++ b/svc/reward_commission.go @@ -161,7 +161,7 @@ func GetRewardCommission(engine *xorm.Engine, rmd *md.CommissionParam, isShare b comm(commArr, ulink) return profit, pvdFee, sysFee, 0, ulink, nil } - if cfg.Mode == "lv_integral_release" { //公排 + if cfg.Mode == "lv_integral_release" { // price = rmd.OldPrice pvdFee, sysFee, _, ulink, err := IntegralRelease(engine, uid, newLevel, returnAllLevel, rmd.IsShowExtend, newProvider, user, comf, price, cfg, rmd.IsGoods, commArr, virtualCoinMoneyRate) if err != nil { diff --git a/svc/svc_integral_release.go b/svc/svc_integral_release.go index ecf8a8b..897039a 100644 --- a/svc/svc_integral_release.go +++ b/svc/svc_integral_release.go @@ -167,7 +167,7 @@ func CalIntegralRelease(subsidyTmp map[string]*md.IntegralReleaseLvGrade, totalA // 等级往上升则置0 maxLevelWeight = node.ParentUser.LevelWeight } - node.Profit = zhios_order_relate_utils.StrToFloat64(fmt.Sprintf("%.4f", node.Profit)) + node.Profit = zhios_order_relate_utils.FloatFormat(node.Profit, 8) node = node.ParentUser } @@ -233,10 +233,10 @@ func CalReturnAmountAndRatio(level, ownbuyReturnType int, userType string, fee, amountList[i].Val = 0 } } - commission = zhios_order_relate_utils.FloatFormat(commission, 2) + commission = zhios_order_relate_utils.FloatFormat(commission, 9) for i, coin := range amountList { - amountList[i].Val = zhios_order_relate_utils.FloatFormat(coin.Val, 6) + amountList[i].Val = zhios_order_relate_utils.FloatFormat(coin.Val, 9) } return commission, commissionRatio, amountList, ratioList @@ -275,7 +275,7 @@ func getVirtualCoinRatio(typ string, level int, grade map[string]*md.IntegralRel if !ok { ratio = "0" } else { - ratio = zhios_order_relate_utils.Float64ToStrByPrec(zhios_order_relate_utils.StrToFloat64(ratio)/100, 6) + ratio = zhios_order_relate_utils.Float64ToStrByPrec(zhios_order_relate_utils.StrToFloat64(ratio)/100, 8) } return }