Parcourir la source

test

tags/v4.3.1
huangjiajun il y a 1 an
Parent
révision
08838bd679
4 fichiers modifiés avec 6 ajouts et 3 suppressions
  1. +1
    -0
      md/commission_parameter.go
  2. +0
    -1
      rule/relate_commission.go
  3. +4
    -1
      svc/get_plan_cfg.go
  4. +1
    -1
      svc/reward_commission.go

+ 1
- 0
md/commission_parameter.go Voir le fichier

@@ -19,6 +19,7 @@ type CommissionParam struct {
GoodsCommission string `json:"goods_commission"`
GoodsType string `json:"goods_type"`
TikTokTeamCommission string `json:"tik_tok_team_commission"`
IsTikTokTeamOrder string `json:"is_tik_tok_team_order"`
MinLevel int `json:"min_level"`
}
type CommissionFirstParam struct {


+ 0
- 1
rule/relate_commission.go Voir le fichier

@@ -277,7 +277,6 @@ func BatchGetCommissionByOrder(engine *xorm.Engine, dbName string, CommissionPar
param.CommissionParam.OldPrice = param.CommissionParam.GoodsPrice
}
param.CommissionParam.Oid = param.Oid

profit, pvdFee, sysFee, subsidyFee, lvUser, err := svc.GetRewardCommission(engine, &param.CommissionParam, isShare, param.Uid, param.Provider, dbName, isAllLevelReturn, map[string]string{}, commArr, plan, commission, virtualCoinMoneyRate)
if err != nil {
return err


+ 4
- 1
svc/get_plan_cfg.go Voir le fichier

@@ -42,10 +42,13 @@ func GetAllPlan(eg *xorm.Engine, dbName string) (map[string]*model.PlanReward, m
return plan, commission, virtualCoinMoneyRate
}

func GetPlanCfg(eg *xorm.Engine, pvd, masterId string, rewardOpts map[string]*model.PlanReward, commissionOpts map[int]*model.PlanCommission, virtualCoinMoneyRate map[int]string) (*comm_plan.PlanOpt, error) {
func GetPlanCfg(eg *xorm.Engine, pvd, masterId string, rewardOpts map[string]*model.PlanReward, commissionOpts map[int]*model.PlanCommission, virtualCoinMoneyRate map[int]string, rmd *md.CommissionParam) (*comm_plan.PlanOpt, error) {
opt := &comm_plan.PlanOpt{}
// 根据供应商
rewardOpt := rewardOpts[pvd]
if pvd == "tikTok" && rmd.IsTikTokTeamOrder == "1" && rewardOpts["tikTokTeam"] != nil {
rewardOpt = rewardOpts["tikTokTeam"]
}
if rewardOpt == nil {
return nil, zhios_order_relate_logx.Warn("找不到方案记录")
}


+ 1
- 1
svc/reward_commission.go Voir le fichier

@@ -65,7 +65,7 @@ func GetRewardCommission(engine *xorm.Engine, rmd *md.CommissionParam, isShare b
level = zhios_order_relate_utils.StrToInt(extraData["show_level"])
}
ownbuyReturnType := zhios_order_relate_utils.StrToInt(extraData["ownbuy_return_type"])
cfg, err := GetPlanCfg(engine, newProvider, masterId, rewardOpts, commissionOpts, virtualCoinMoneyRate)
cfg, err := GetPlanCfg(engine, newProvider, masterId, rewardOpts, commissionOpts, virtualCoinMoneyRate, rmd)
if err != nil {
return 0, 0, 0, 0, nil, err
}


Chargement…
Annuler
Enregistrer