Browse Source

add reverse:for v3.8.0 抽成调整

tags/v3.8.0
huangjiajun 2 years ago
parent
commit
ed731678c3
1 changed files with 6 additions and 5 deletions
  1. +6
    -5
      svc/reward_commission.go

+ 6
- 5
svc/reward_commission.go View File

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



Loading…
Cancel
Save