Commit 0a8b3b4b authored by hujiebin's avatar hujiebin

Feature/3.7.0 up

parent 8d77bc8c
...@@ -69,6 +69,7 @@ var ( ...@@ -69,6 +69,7 @@ var (
GroupCustomThemeLimit = myerr.NewBusinessCode(14020, "Group Custom Theme Limit", myerr.BusinessData{}) //群主题定制数量只能是5个 GroupCustomThemeLimit = myerr.NewBusinessCode(14020, "Group Custom Theme Limit", myerr.BusinessData{}) //群主题定制数量只能是5个
GroupSupportIpLimit = myerr.NewBusinessCode(14024, "ID:%v is a duplicate account, please select another user to receive the reward", myerr.BusinessData{}) // 群组扶持ip限制 GroupSupportIpLimit = myerr.NewBusinessCode(14024, "ID:%v is a duplicate account, please select another user to receive the reward", myerr.BusinessData{}) // 群组扶持ip限制
GroupNoPowerToSvip6 = myerr.NewBusinessCode(14026, "Cannot use this permission for SVIP6", myerr.BusinessData{}) // 踢出,无法对SVIP6使用此权限 GroupNoPowerToSvip6 = myerr.NewBusinessCode(14026, "Cannot use this permission for SVIP6", myerr.BusinessData{}) // 踢出,无法对SVIP6使用此权限
GroupSupportWealthLevel8 = myerr.NewBusinessCode(14027, "Wealth level not reach 8", myerr.BusinessData{}) // 财富等级8级
// 家族 // 家族
GroupPowerHasJoinOther = myerr.NewBusinessCode(15001, "You already have joined power, please exit first", myerr.BusinessData{}) // 已经加入了其它国家势力 GroupPowerHasJoinOther = myerr.NewBusinessCode(15001, "You already have joined power, please exit first", myerr.BusinessData{}) // 已经加入了其它国家势力
......
...@@ -179,7 +179,7 @@ func GetSupportDetail(c *gin.Context) (*mycontext.MyContext, error) { ...@@ -179,7 +179,7 @@ func GetSupportDetail(c *gin.Context) (*mycontext.MyContext, error) {
func TryAddSupporter(c *gin.Context) (*mycontext.MyContext, error) { func TryAddSupporter(c *gin.Context) (*mycontext.MyContext, error) {
myContext := mycontext.CreateMyContext(c.Keys) myContext := mycontext.CreateMyContext(c.Keys)
myUserId, err := req.GetUserId(c) myUserId, lang, err := req.GetUserIdLang(c, myContext)
if err != nil { if err != nil {
return myContext, err return myContext, err
} }
...@@ -222,7 +222,17 @@ func TryAddSupporter(c *gin.Context) (*mycontext.MyContext, error) { ...@@ -222,7 +222,17 @@ func TryAddSupporter(c *gin.Context) (*mycontext.MyContext, error) {
if role != group_e.GROUP_MANAGER && role != group_e.GROUP_ADMIN { if role != group_e.GROUP_MANAGER && role != group_e.GROUP_ADMIN {
return myContext, bizerr.NotManagerOrAdmin return myContext, bizerr.NotManagerOrAdmin
} }
// 判断财富等级必须要大于等于8级
wealthGrade, _, err := user_m.GetWealthGrade(model, userId)
if err != nil {
return myContext, err
}
if wealthGrade < 8 {
if msg, _ := res_m.GetResMultiTextBy(model.DB(), 187, lang); msg != nil { // 187:res_multi_text 财富等级为到8级
return myContext, myerr.NewBusinessCodeNoCheck(bizerr.GroupSupportWealthLevel8.GetCode(), msg.Content, myerr.BusinessData{})
}
return myContext, bizerr.GroupSupportWealthLevel8
}
// 判断用户是否作为助手领取过奖励 // 判断用户是否作为助手领取过奖励
sameImeiUsers, err := user_m.GetSameImeiMap(model, userId) sameImeiUsers, err := user_m.GetSameImeiMap(model, userId)
if err != nil { if err != nil {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment