Browse Source

test

tags/v4.3.1
huangjiajun 1 year ago
parent
commit
26a79aeb1e
1 changed files with 5 additions and 5 deletions
  1. +5
    -5
      lib/comm_plan/ds_check.go

+ 5
- 5
lib/comm_plan/ds_check.go View File

@@ -50,7 +50,7 @@ func CalReturnAmountAndRatioDsOwn(level, ownbuyReturnType, peerNum int, userType
amountList[i].Val = 0 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 { 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, 6)
@@ -84,7 +84,7 @@ func getVirtualCoinRatioDsOwn(typ string, level, peerNum int, grade map[int]*LvG
default: default:
ratio, ok = grade[level].SelfRateList[coinId] 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 { if !ok {
ratio = "0" ratio = "0"
@@ -134,7 +134,7 @@ func CalReturnAmountAndRatioDs(level, ownbuyReturnType, peerNum int, userType st
amountList[i].Val = 0 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 { 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, 6)
@@ -185,7 +185,7 @@ func CalReturnAmountAndRatioDsSecond(level, ownbuyReturnType, peerNum int, userT
amountList[i].Val = 0 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 { 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, 6)
@@ -256,7 +256,7 @@ func CalcDsCheck(opt *PlanOpt, totalAmt, integralTotalAmt float64, userList *LvU
restAmtList, _ = CalVirtualCommissionMinus(totalAmtList, amountList) restAmtList, _ = CalVirtualCommissionMinus(totalAmtList, amountList)
// 累计比例 // 累计比例
accumulateRatioList = ratioList accumulateRatioList = ratioList
restAmt = zhios_order_relate_utils.FloatFormat(restAmt, 2)
restAmt = zhios_order_relate_utils.FloatFormat(restAmt, 6)


Loop: Loop:
for node.ParentUser != nil { //查找上级用户 for node.ParentUser != nil { //查找上级用户


Loading…
Cancel
Save