Browse Source

add reverse:for v1.4.7 分佣方案调整

tags/v1.4.7
huangjiajun 2 years ago
parent
commit
475ca02fd2
1 changed files with 26 additions and 0 deletions
  1. +26
    -0
      rule/relate_commission.go

+ 26
- 0
rule/relate_commission.go View File

@@ -150,6 +150,32 @@ 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 SettleCommWithOrder(eg *xorm.Engine, dbName string, CommissionParam md.CommissionFirstParam) (float64, float64, float64, float64, *comm_plan.LvUser, error) {
var (
isShare = false
isAllLevelReturn = false
)
if CommissionParam.IsShare != 0 {
isShare = true
}

if CommissionParam.IsAllLevelReturn != 0 {
isAllLevelReturn = true
}
var mapData = map[string]string{
"old_lv": CommissionParam.OldLv,
"new_lv": CommissionParam.NewLv,
"ownbuy_return_type": zhios_order_relate_utils.IntToStr(CommissionParam.OwnbuyReturnType),
}
virCfg, _ := db.SysCfgGetOne(eg, "virtual_coin_rebate_type")
var virType = "price"
if virCfg != nil && virCfg.Val != "" {
virType = virCfg.Val
}
CommissionParam.CommissionParam.Oid = CommissionParam.GoodsId
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) {


Loading…
Cancel
Save