|
|
@@ -435,12 +435,14 @@ func CommFee(fee float64, opt *comm_plan.PlanOpt, types, isGoods string) (float6 |
|
|
|
pushHandFee := fee * opt.PushHandRate |
|
|
|
merchantFee := fee * opt.MerchantRate |
|
|
|
newAgentFee := fee * opt.NewAgentRate |
|
|
|
// 剩余可分配的佣金 |
|
|
|
total := int64(fee*1e4) - int64(pvdFee*1e4) - int64(sysFee*1e4) - int64(regionFee*1e4) - int64(globalFee*1e4) - int64(pushHandFee*1e4) - int64(merchantFee*1e4) - int64(newAgentFee*1e4) |
|
|
|
if isGoods == "1" { |
|
|
|
orderBeforeRate := fee * opt.OrderBeforeRate |
|
|
|
total = total - int64(orderBeforeRate*1e4) |
|
|
|
fee1 := int64(fee*1e4) - int64(orderBeforeRate*1e4) |
|
|
|
fee = float64(fee1) / 1e4 |
|
|
|
} |
|
|
|
// 剩余可分配的佣金 |
|
|
|
total := int64(fee*1e4) - int64(pvdFee*1e4) - int64(sysFee*1e4) - int64(regionFee*1e4) - int64(globalFee*1e4) - int64(pushHandFee*1e4) - int64(merchantFee*1e4) - int64(newAgentFee*1e4) |
|
|
|
|
|
|
|
fee = float64(total) / 1e4 |
|
|
|
return fee, pvdFee, sysFee |
|
|
|
} |
|
|
|