Selaa lähdekoodia

add reverse:for v1.1.0 分佣方案优化

tags/v1.1.0
huangjiajun 2 vuotta sitten
vanhempi
commit
c869a0a548
1 muutettua tiedostoa jossa 32 lisäystä ja 0 poistoa
  1. +32
    -0
      rule/relate_commission.go

+ 32
- 0
rule/relate_commission.go Näytä tiedosto

@@ -147,3 +147,35 @@ func SettleCommWithGoodsDetail(eg *xorm.Engine, dbName string, CommissionParam m
profit, pvdFee, sysFee, subsidyFee, lvUser, err := svc.GetRewardCommission(eg, &CommissionParam.CommissionParam, isShare, CommissionParam.Uid, CommissionParam.Provider, dbName, isAllLevelReturn, mapData, virType)
return profit, pvdFee, sysFee, subsidyFee, lvUser, err
}

//获取自购分享佣金的
func GetRewardCommission(eg *xorm.Engine, dbName, mode string, CommissionParam md.CommissionFirstParam) (float64, float64, *comm_plan.LvUser, error) {
var (
isAll = false
isShare = false
isAllLevelReturn = false
commission, shareCommission float64
)
if CommissionParam.IsShare == 0 {
isAll = true
}
if CommissionParam.IsShare == 1 {
isShare = true
}
if CommissionParam.IsAllLevelReturn != 0 {
isAllLevelReturn = true
}
var lvUser = &comm_plan.LvUser{}
var mapsDta = map[string]string{"show_level": CommissionParam.ShowLevel}
if isAll {
shareCommission, _, _, _, lvUser, _ = svc.GetRewardCommission(eg, &CommissionParam.CommissionParam, true, CommissionParam.Uid, CommissionParam.Provider, dbName, isAllLevelReturn, mapsDta, mode)
commission, _, _, _, lvUser, _ = svc.GetRewardCommission(eg, &CommissionParam.CommissionParam, false, CommissionParam.Uid, CommissionParam.Provider, dbName, isAllLevelReturn, mapsDta, mode)
} else {
if isShare {
shareCommission, _, _, _, lvUser, _ = svc.GetRewardCommission(eg, &CommissionParam.CommissionParam, isShare, CommissionParam.Uid, CommissionParam.Provider, dbName, isAllLevelReturn, mapsDta, mode)
} else {
commission, _, _, _, lvUser, _ = svc.GetRewardCommission(eg, &CommissionParam.CommissionParam, isShare, CommissionParam.Uid, CommissionParam.Provider, dbName, isAllLevelReturn, mapsDta, mode)
}
}
return commission, shareCommission, lvUser, nil
}

Ladataan…
Peruuta
Tallenna