diff --git a/md/commission_parameter.go b/md/commission_parameter.go index 3f899de..d7e30f2 100644 --- a/md/commission_parameter.go +++ b/md/commission_parameter.go @@ -14,6 +14,7 @@ type CommissionParam struct { PaidPrice string `json:"paid_price"` Oid string `json:"oid"` //标记 IsGoods string `json:"is_goods"` + ShowLevel string `json:"show_level"` IsShowExtend string `json:"is_show_extend"` } type CommissionFirstParam struct { diff --git a/rule/relate_commission.go b/rule/relate_commission.go index 4804518..a2399eb 100644 --- a/rule/relate_commission.go +++ b/rule/relate_commission.go @@ -45,6 +45,7 @@ func BatchGetCommissionByGoods(eg *xorm.Engine, dbName string, commissionParamLi } param.CommissionParam.Oid = param.GoodsId param.CommissionParam.IsGoods = "1" + param.CommissionParam.ShowLevel=param.ShowLevel _, _, _, _, lvUser, err := svc.GetRewardCommission(eg, ¶m.CommissionParam, isShare, param.Uid, param.Provider, dbName, isAllLevelReturn, map[string]string{}, virType) if err != nil { @@ -199,6 +200,7 @@ func SettleCommWithGoodsDetail(eg *xorm.Engine, dbName string, CommissionParam m } CommissionParam.CommissionParam.Oid = CommissionParam.GoodsId CommissionParam.CommissionParam.IsGoods = "1" + CommissionParam.CommissionParam.ShowLevel=CommissionParam.ShowLevel 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 @@ -280,6 +282,7 @@ func GetRewardCommission(eg *xorm.Engine, dbName, mode string, CommissionParam m } CommissionParam.CommissionParam.Oid = CommissionParam.GoodsId CommissionParam.CommissionParam.IsGoods = "1" + CommissionParam.CommissionParam.ShowLevel=CommissionParam.ShowLevel var lvUser = &comm_plan.LvUser{} var mapsDta = map[string]string{"show_level": CommissionParam.ShowLevel} diff --git a/svc/reward_commission.go b/svc/reward_commission.go index 1bbd639..8d0dbc2 100644 --- a/svc/reward_commission.go +++ b/svc/reward_commission.go @@ -52,6 +52,9 @@ func GetRewardCommission(engine *xorm.Engine, rmd *md.CommissionParam, isShare b level = zhios_order_relate_utils.StrToInt(extraData["old_lv"]) newLevel = zhios_order_relate_utils.StrToInt(extraData["new_lv"]) } + if rmd.ShowLevel != "" { + level = zhios_order_relate_utils.StrToInt(rmd.ShowLevel) + } if extraData["show_level"] != "" { level = zhios_order_relate_utils.StrToInt(extraData["show_level"]) }