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