diff --git a/rule/service_award_dividend/index.go b/rule/service_award_dividend/index.go index c0a2d26..9118ebd 100644 --- a/rule/service_award_dividend/index.go +++ b/rule/service_award_dividend/index.go @@ -5,6 +5,7 @@ import ( "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" "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" 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" @@ -62,7 +63,7 @@ func JoinServiceAwardDividendRelation(eg *xorm.Engine, req md.JoinServiceAwardDi if levelMap[user.Level].LevelWeight >= levelMap[parentUser.Level].LevelWeight { 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) if err != nil { return err @@ -77,7 +78,7 @@ func JoinServiceAwardDividendRelation(eg *xorm.Engine, req md.JoinServiceAwardDi } } else { 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) if err != nil { return err diff --git a/rule/service_award_dividend/md/service_award_dividend.go b/rule/service_award_dividend/md/service_award_dividend.go index 2eda064..d47f61f 100644 --- a/rule/service_award_dividend/md/service_award_dividend.go +++ b/rule/service_award_dividend/md/service_award_dividend.go @@ -1,8 +1,8 @@ package md 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 {