Browse Source

add reverse:for v3.4.2 极差传入等级统计下一等级奖励

tags/v3.4.2
huangjiajun 2 years ago
parent
commit
339589f006
3 changed files with 7 additions and 0 deletions
  1. +1
    -0
      md/commission_parameter.go
  2. +3
    -0
      rule/relate_commission.go
  3. +3
    -0
      svc/reward_commission.go

+ 1
- 0
md/commission_parameter.go View File

@@ -14,6 +14,7 @@ type CommissionParam struct {
PaidPrice string `json:"paid_price"` PaidPrice string `json:"paid_price"`
Oid string `json:"oid"` //标记 Oid string `json:"oid"` //标记
IsGoods string `json:"is_goods"` IsGoods string `json:"is_goods"`
ShowLevel string `json:"show_level"`
IsShowExtend string `json:"is_show_extend"` IsShowExtend string `json:"is_show_extend"`
} }
type CommissionFirstParam struct { type CommissionFirstParam struct {


+ 3
- 0
rule/relate_commission.go View File

@@ -45,6 +45,7 @@ func BatchGetCommissionByGoods(eg *xorm.Engine, dbName string, commissionParamLi
} }
param.CommissionParam.Oid = param.GoodsId param.CommissionParam.Oid = param.GoodsId
param.CommissionParam.IsGoods = "1" param.CommissionParam.IsGoods = "1"
param.CommissionParam.ShowLevel=param.ShowLevel


_, _, _, _, lvUser, err := svc.GetRewardCommission(eg, &param.CommissionParam, isShare, param.Uid, param.Provider, dbName, isAllLevelReturn, map[string]string{}, virType) _, _, _, _, lvUser, err := svc.GetRewardCommission(eg, &param.CommissionParam, isShare, param.Uid, param.Provider, dbName, isAllLevelReturn, map[string]string{}, virType)
if err != nil { if err != nil {
@@ -199,6 +200,7 @@ func SettleCommWithGoodsDetail(eg *xorm.Engine, dbName string, CommissionParam m
} }
CommissionParam.CommissionParam.Oid = CommissionParam.GoodsId CommissionParam.CommissionParam.Oid = CommissionParam.GoodsId
CommissionParam.CommissionParam.IsGoods = "1" 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) 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 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.Oid = CommissionParam.GoodsId
CommissionParam.CommissionParam.IsGoods = "1" CommissionParam.CommissionParam.IsGoods = "1"
CommissionParam.CommissionParam.ShowLevel=CommissionParam.ShowLevel


var lvUser = &comm_plan.LvUser{} var lvUser = &comm_plan.LvUser{}
var mapsDta = map[string]string{"show_level": CommissionParam.ShowLevel} var mapsDta = map[string]string{"show_level": CommissionParam.ShowLevel}


+ 3
- 0
svc/reward_commission.go View File

@@ -52,6 +52,9 @@ func GetRewardCommission(engine *xorm.Engine, rmd *md.CommissionParam, isShare b
level = zhios_order_relate_utils.StrToInt(extraData["old_lv"]) level = zhios_order_relate_utils.StrToInt(extraData["old_lv"])
newLevel = zhios_order_relate_utils.StrToInt(extraData["new_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"] != "" { if extraData["show_level"] != "" {
level = zhios_order_relate_utils.StrToInt(extraData["show_level"]) level = zhios_order_relate_utils.StrToInt(extraData["show_level"])
} }


Loading…
Cancel
Save