diff --git a/lib/comm_plan/all.go b/lib/comm_plan/all.go index 6c63785..3121bdf 100644 --- a/lib/comm_plan/all.go +++ b/lib/comm_plan/all.go @@ -165,7 +165,7 @@ func CalcAll(opt *PlanOpt, totalAmt, integralTotalAmt float64, userList *LvUser, restAmtList, _ = CalVirtualCommissionMinus(totalAmtList, amountList) // 累计比例 accumulateRatioList = ratioList - restAmt = zhios_order_relate_utils.FloatFormat(restAmt, 2) + restAmt = zhios_order_relate_utils.FloatFormat(restAmt, 3) Loop: for node.ParentUser != nil { //查找上级用户 @@ -249,7 +249,7 @@ func sameMoney(lv, isOnlySubsidy int, restAmt, profit, peerRate, totalRatio, res //极差返利 if opt.UserRate[lv].PayMode == 0 && isOnlySubsidy == 0 { restAmt -= profit // 剩余可分 - restAmt = zhios_order_relate_utils.FloatFormat(restAmt, 2) + restAmt = zhios_order_relate_utils.FloatFormat(restAmt, 3) peerRate += restRatio totalRatio += restRatio } else if isOnlySubsidy == 1 { //如果只返补贴 当成是极差的一部分 所以要扣 不是额外的 @@ -260,7 +260,7 @@ func sameMoney(lv, isOnlySubsidy int, restAmt, profit, peerRate, totalRatio, res return profit, restAmt, totalRatio, subsidyFee, peerRate, true } restAmt -= subsidyFee // 剩余可分 - restAmt = zhios_order_relate_utils.FloatFormat(restAmt, 2) + restAmt = zhios_order_relate_utils.FloatFormat(restAmt, 3) totalRatio += zhios_order_relate_utils.FloatFormat(subsidyBili, 6) } } @@ -502,7 +502,7 @@ func teamDiffMoney(profit float64, payMode, isOnlySubsidy int, totalAmt, restAmt profit = 0 return profit, restAmt, totalRatio, subsidyFee, true } - profit = zhios_order_relate_utils.FloatFormat(teamRatio*totalAmt, 2) + profit = zhios_order_relate_utils.FloatFormat(teamRatio*totalAmt, 3) if restAmt < profit { profit = 0 return profit, restAmt, totalRatio, subsidyFee, true @@ -519,7 +519,7 @@ func teamDiffMoney(profit float64, payMode, isOnlySubsidy int, totalAmt, restAmt } restAmt -= subsidyFee // 剩余可分 } - restAmt = zhios_order_relate_utils.FloatFormat(restAmt, 2) + restAmt = zhios_order_relate_utils.FloatFormat(restAmt, 3) return profit, restAmt, totalRatio, subsidyFee, false }