|
|
@@ -428,6 +428,11 @@ func CommFee(fee float64, opt *comm_plan.PlanOpt, types, isGoods string) (float6 |
|
|
|
if types == "integral" && opt.IntegralOpen == 0 || opt.Mode == "lv_winery" { //积分抽成后台没开启不用扣 |
|
|
|
return fee, 0, 0 |
|
|
|
} |
|
|
|
if isGoods == "1" { |
|
|
|
orderBeforeRate := fee * opt.OrderBeforeRate |
|
|
|
fee1 := int64(fee*1e4) - int64(orderBeforeRate*1e4) |
|
|
|
fee = float64(fee1) / 1e4 |
|
|
|
} |
|
|
|
pvdFee := fee * opt.PvdRate // 供应商联盟比例 |
|
|
|
sysFee := fee * opt.SysRate // 平台比例 |
|
|
|
regionFee := fee * opt.RegionRate // 区域代理比例 |
|
|
@@ -435,11 +440,7 @@ func CommFee(fee float64, opt *comm_plan.PlanOpt, types, isGoods string) (float6 |
|
|
|
pushHandFee := fee * opt.PushHandRate |
|
|
|
merchantFee := fee * opt.MerchantRate |
|
|
|
newAgentFee := fee * opt.NewAgentRate |
|
|
|
if isGoods == "1" { |
|
|
|
orderBeforeRate := fee * opt.OrderBeforeRate |
|
|
|
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) |
|
|
|
|
|
|
|