From c6bc4b0532b9ab980d8e7f2bd462f991ff636147 Mon Sep 17 00:00:00 2001 From: chenweijian <820961417@qq.com> Date: Mon, 27 Mar 2023 21:03:45 +0800 Subject: [PATCH] =?UTF-8?q?=E9=83=A8=E5=88=86=E7=94=A8=E6=88=B7=E4=B8=8D?= =?UTF-8?q?=E8=83=BD=E5=8A=A0=E5=85=A5=E5=AE=B6=E6=97=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- myerr/bizerr/bizCode.go | 1 + route/group_power_r/group_power.go | 12 ++++++++++++ 2 files changed, 13 insertions(+) diff --git a/myerr/bizerr/bizCode.go b/myerr/bizerr/bizCode.go index d8e87d6..1aec2dd 100644 --- a/myerr/bizerr/bizCode.go +++ b/myerr/bizerr/bizCode.go @@ -93,6 +93,7 @@ var ( GroupPowerUserHaveNoJoin = myerr.NewBusinessCode(15020, "User have no joined power", myerr.BusinessData{}) // 还未加入国家势力 GroupPowerChangeNameplate = myerr.NewBusinessCode(15021, "Can only be modified at the silver level", myerr.BusinessData{}) // 修改铭牌不够等级 GroupPowerMemberMax = myerr.NewBusinessCode(15022, "The family size has reached the upper limit", myerr.BusinessData{}) // 家族人数达到上限 + GroupPowerCannotJoin = myerr.NewBusinessCode(15023, "You cannot join", myerr.BusinessData{}) // 不能加入家族 TaskHasAward = myerr.NewBusinessCode(19001, "task has award", myerr.BusinessData{}) diff --git a/route/group_power_r/group_power.go b/route/group_power_r/group_power.go index 055d8b7..3f21f35 100644 --- a/route/group_power_r/group_power.go +++ b/route/group_power_r/group_power.go @@ -958,6 +958,12 @@ func GroupPowerApplyJoin(c *gin.Context) (*mycontext.MyContext, error) { if err != nil { return myContext, myerr.WrapErr(err) } + // Aoxi要求不能让这些人加入家族 + banUserMap := map[uint64]bool{251: true, 1384611: true, 4223511: true, 4338751: true, 4339471: true, 4339541: true, + 4354581: true, 6541: true, 23971: true} + if _, ok := banUserMap[userId]; ok { + return myContext, bizerr.GroupPowerCannotJoin + } model := domain.CreateModelContext(myContext) // 判断家族是否存在 @@ -1037,6 +1043,12 @@ func GroupPowerApplyPass(c *gin.Context) (*mycontext.MyContext, error) { if err != nil { return myContext, err } + // Aoxi要求不能让这些人加入家族 + banUserMap := map[uint64]bool{251: true, 1384611: true, 4223511: true, 4338751: true, 4339471: true, 4339541: true, + 4354581: true, 6541: true, 23971: true} + if _, ok := banUserMap[optUser.ID]; ok { + return myContext, bizerr.GroupPowerHaveNoPower + } // 判断是否加入了家族 gpU := groupPower_m.GroupPowerUser{UserId: userId} -- 2.22.0