From d4afc63b3acb30736c0298417653768dafdb1694 Mon Sep 17 00:00:00 2001 From: liwei <2211068034@qq.com> Date: Thu, 13 Jul 2023 17:08:48 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E5=B7=A5=E4=BC=9A=E7=94=B3?= =?UTF-8?q?=E8=AF=B7=E5=88=97=E8=A1=A8=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/sociaty/api_cross_refuse.go | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/modules/sociaty/api_cross_refuse.go b/modules/sociaty/api_cross_refuse.go index 170f5c777..c1ef0032f 100644 --- a/modules/sociaty/api_cross_refuse.go +++ b/modules/sociaty/api_cross_refuse.go @@ -44,6 +44,22 @@ func (this *apiComp) Refuse(session comm.IUserSession, req *pb.SociatyRefuseReq) return } + // 判断改用户是否在申请记录中 + var flag bool + for _, r := range sociaty.GetApplyRecord() { + if r.Uid == req.Uid { + flag = true + break + } + } + if !flag { + errdata = &pb.ErrorData{ + Code: pb.ErrorCode_SociatyApplyCancel, + Title: pb.ErrorCode_SociatyApplyCancel.ToString(), + } + return + } + // 已是公会成员 if this.module.modelSociaty.isMember(uid, sociaty) { errdata = &pb.ErrorData{