瀏覽代碼

服务奖分配用户

master
huangjiajun 3 月之前
父節點
當前提交
7d034490e8
共有 2 個文件被更改,包括 5 次插入4 次删除
  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 查看文件

@@ -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


+ 2
- 2
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 {


Loading…
取消
儲存