Explorar el Código

test

tags/v4.3.1
huangjiajun hace 1 año
padre
commit
b9164b7116
Se han modificado 1 ficheros con 5 adiciones y 5 borrados
  1. +5
    -5
      lib/comm_plan/all.go

+ 5
- 5
lib/comm_plan/all.go Ver fichero

@@ -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
}



Cargando…
Cancelar
Guardar