Browse Source

add reverse:for v3.1.3 直推奖励制度调整

tags/v3.1.3
huangjiajun 2 years ago
parent
commit
3acb4452a7
3 changed files with 8 additions and 0 deletions
  1. +2
    -0
      md/extend_price_reward.go
  2. +3
    -0
      svc/extend_agent_commission.go
  3. +3
    -0
      svc/extend_price_reward.go

+ 2
- 0
md/extend_price_reward.go View File

@@ -9,9 +9,11 @@ type ExtendRewardLvGrade struct {
ExtendPriceRewardProvince map[string]ExtendPriceRewardListDetail `json:"extend_price_reward_province"`
ExtendPriceRewardCity map[string]ExtendPriceRewardListDetail `json:"extend_price_reward_city"`
ExtendPriceRewardArea map[string]ExtendPriceRewardListDetail `json:"extend_price_reward_area"`
ExtendPriceRewardSite map[string]ExtendPriceRewardListDetail `json:"extend_price_reward_site"`
ExtendPriceRewardBuyGoodsProvince map[string]ExtendPriceRewardListDetail `json:"extend_price_reward_buy_goods_province"`
ExtendPriceRewardBuyGoodsCity map[string]ExtendPriceRewardListDetail `json:"extend_price_reward_buy_goods_city"`
ExtendPriceRewardBuyGoodsArea map[string]ExtendPriceRewardListDetail `json:"extend_price_reward_buy_goods_area"`
ExtendPriceRewardBuyGoodsSite map[string]ExtendPriceRewardListDetail `json:"extend_price_reward_buy_goods_site"`
}
type ExtendPriceRewardListDetail struct {
BaseVal string `json:"base_val"`


+ 3
- 0
svc/extend_agent_commission.go View File

@@ -80,6 +80,9 @@ func AddExtendAgentCommission(eg *xorm.Engine, args map[string]string) {
if agentUser.Level == 3 {
rewardList = lvGrade.ExtendPriceRewardBuyGoodsArea
}
if agentUser.Level == 4 {
rewardList = lvGrade.ExtendPriceRewardBuyGoodsSite
}
//判断有没有存过
relate, _ := db.GetExtendAgentCommissionRelate(eg, args["oid"], args["pvd"])
if relate != nil {


+ 3
- 0
svc/extend_price_reward.go View File

@@ -53,6 +53,9 @@ func ExtendPriceReward(eg *xorm.Engine, param map[string]string, cfg *comm_plan.
if param["level"] == "3" {
rewardList = lvGrade.ExtendPriceRewardArea
}
if param["level"] == "4" {
rewardList = lvGrade.ExtendPriceRewardSite
}
}
//查出当前的数量
count, _ := eg.Where("source=? and lv=? and parent_uid=?", param["source"], param["level"], userProfile.ParentUid).Count(&model.UserLvBuyList{})


Loading…
Cancel
Save