Browse Source

服务奖分配用户

master
huangjiajun 3 months ago
parent
commit
7d034490e8
2 changed files with 5 additions and 4 deletions
  1. +3
    -2
      rule/service_award_dividend/index.go
  2. +2
    -2
      rule/service_award_dividend/md/service_award_dividend.go

+ 3
- 2
rule/service_award_dividend/index.go View File

@@ -5,6 +5,7 @@ import (
"code.fnuoos.com/go_rely_warehouse/zyos_go_order_relate_rule.git/db/model" "code.fnuoos.com/go_rely_warehouse/zyos_go_order_relate_rule.git/db/model"
md2 "code.fnuoos.com/go_rely_warehouse/zyos_go_order_relate_rule.git/md" md2 "code.fnuoos.com/go_rely_warehouse/zyos_go_order_relate_rule.git/md"
"code.fnuoos.com/go_rely_warehouse/zyos_go_order_relate_rule.git/rule/service_award_dividend/md" "code.fnuoos.com/go_rely_warehouse/zyos_go_order_relate_rule.git/rule/service_award_dividend/md"
zhios_order_relate_utils "code.fnuoos.com/go_rely_warehouse/zyos_go_order_relate_rule.git/utils"
"code.fnuoos.com/go_rely_warehouse/zyos_go_order_relate_rule.git/utils/cache" "code.fnuoos.com/go_rely_warehouse/zyos_go_order_relate_rule.git/utils/cache"
zhios_order_relate_logx "code.fnuoos.com/go_rely_warehouse/zyos_go_order_relate_rule.git/utils/logx" zhios_order_relate_logx "code.fnuoos.com/go_rely_warehouse/zyos_go_order_relate_rule.git/utils/logx"
"code.fnuoos.com/go_rely_warehouse/zyos_model.git/src/implement" "code.fnuoos.com/go_rely_warehouse/zyos_model.git/src/implement"
@@ -62,7 +63,7 @@ func JoinServiceAwardDividendRelation(eg *xorm.Engine, req md.JoinServiceAwardDi


if levelMap[user.Level].LevelWeight >= levelMap[parentUser.Level].LevelWeight { if levelMap[user.Level].LevelWeight >= levelMap[parentUser.Level].LevelWeight {
for _, vv := range vipAllocationSetStruct { for _, vv := range vipAllocationSetStruct {
if vv.FromVipId == user.Level {
if zhios_order_relate_utils.StrToInt(vv.FromVipId) == user.Level {
err = AutoAddVip(eg, user, req.ParentUid, vv, req.RegionId, req.CreateAt) err = AutoAddVip(eg, user, req.ParentUid, vv, req.RegionId, req.CreateAt)
if err != nil { if err != nil {
return err return err
@@ -77,7 +78,7 @@ func JoinServiceAwardDividendRelation(eg *xorm.Engine, req md.JoinServiceAwardDi
} }
} else { } else {
for _, vv := range vipAllocationSetStruct { for _, vv := range vipAllocationSetStruct {
if vv.FromVipId == user.Level {
if zhios_order_relate_utils.StrToInt(vv.FromVipId) == user.Level {
err = AutoAddVip(eg, user, req.ParentUid, vv, req.RegionId, req.CreateAt) err = AutoAddVip(eg, user, req.ParentUid, vv, req.RegionId, req.CreateAt)
if err != nil { if err != nil {
return err return err


+ 2
- 2
rule/service_award_dividend/md/service_award_dividend.go View File

@@ -1,8 +1,8 @@
package md package md


type VipAllocationSetStruct struct { type VipAllocationSetStruct struct {
FromVipId int `json:"from_vip_id"`
ToVipId []int `json:"to_vip_id"`
FromVipId string `json:"from_vip_id"`
ToVipId []string `json:"to_vip_id"`
} }


type JoinServiceAwardDividendRelationReq struct { type JoinServiceAwardDividendRelationReq struct {


Loading…
Cancel
Save