From 26a79aeb1e1bb760e63c0ec77411ac287b680710 Mon Sep 17 00:00:00 2001 From: huangjiajun <582604932@qq.com> Date: Thu, 30 Mar 2023 17:37:27 +0800 Subject: [PATCH] test --- lib/comm_plan/ds_check.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/comm_plan/ds_check.go b/lib/comm_plan/ds_check.go index 7c6bc35..072a2c8 100644 --- a/lib/comm_plan/ds_check.go +++ b/lib/comm_plan/ds_check.go @@ -50,7 +50,7 @@ func CalReturnAmountAndRatioDsOwn(level, ownbuyReturnType, peerNum int, userType amountList[i].Val = 0 } } - commission = zhios_order_relate_utils.FloatFormat(commission, 2) + commission = zhios_order_relate_utils.FloatFormat(commission, 6) for i, coin := range amountList { amountList[i].Val = zhios_order_relate_utils.FloatFormat(coin.Val, 6) @@ -84,7 +84,7 @@ func getVirtualCoinRatioDsOwn(typ string, level, peerNum int, grade map[int]*LvG default: ratio, ok = grade[level].SelfRateList[coinId] } - ratio = zhios_order_relate_utils.Float64ToStrByPrec(zhios_order_relate_utils.StrToFloat64(ratio)/100, 4) + ratio = zhios_order_relate_utils.Float64ToStrByPrec(zhios_order_relate_utils.StrToFloat64(ratio)/100, 8) if !ok { ratio = "0" @@ -134,7 +134,7 @@ func CalReturnAmountAndRatioDs(level, ownbuyReturnType, peerNum int, userType st amountList[i].Val = 0 } } - commission = zhios_order_relate_utils.FloatFormat(commission, 2) + commission = zhios_order_relate_utils.FloatFormat(commission, 6) for i, coin := range amountList { amountList[i].Val = zhios_order_relate_utils.FloatFormat(coin.Val, 6) @@ -185,7 +185,7 @@ func CalReturnAmountAndRatioDsSecond(level, ownbuyReturnType, peerNum int, userT amountList[i].Val = 0 } } - commission = zhios_order_relate_utils.FloatFormat(commission, 2) + commission = zhios_order_relate_utils.FloatFormat(commission, 6) for i, coin := range amountList { amountList[i].Val = zhios_order_relate_utils.FloatFormat(coin.Val, 6) @@ -256,7 +256,7 @@ func CalcDsCheck(opt *PlanOpt, totalAmt, integralTotalAmt float64, userList *LvU restAmtList, _ = CalVirtualCommissionMinus(totalAmtList, amountList) // 累计比例 accumulateRatioList = ratioList - restAmt = zhios_order_relate_utils.FloatFormat(restAmt, 2) + restAmt = zhios_order_relate_utils.FloatFormat(restAmt, 6) Loop: for node.ParentUser != nil { //查找上级用户