From b4105ab312e691a2d6be9c9e101c8be79170f932 Mon Sep 17 00:00:00 2001 From: jjxu <428192774@qq.com> Date: Fri, 31 Mar 2023 11:18:56 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E9=82=80=E8=AF=B7=E7=A0=81?= =?UTF-8?q?=E7=BB=91=E5=AE=9A=E7=9A=84=E5=88=A4=E6=96=AD=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cmd/internal/controller/artistInfo_user.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cmd/internal/controller/artistInfo_user.go b/cmd/internal/controller/artistInfo_user.go index 6d575e2..18fd6fb 100644 --- a/cmd/internal/controller/artistInfo_user.go +++ b/cmd/internal/controller/artistInfo_user.go @@ -168,12 +168,12 @@ func (a *ArtistInfoUserProvider) GetUserMsg(ctx context.Context, req *artistInfo // 绑定邀请人和受邀请人的账号,并加入到次数统计 func (a *ArtistInfoUserProvider) BindInviteInvitedAccount(ctx context.Context, in *artistInfoUser.BindInviteInvitedAccountRequest) (res *artistInfoUser.BindInviteInvitedAccountRespond, err error) { - // 查询受邀请人是否存在 + // 查询邀请人是否存在 var thisUser model.User if in.InvitedUserId == 0 { - if err = db.DB.Where("id = ? AND invite_code = ?", in.InvitedUserId, in.InviteCode).First(&thisUser).Error; err != nil { + if err = db.DB.Where("invited_code = ?", in.InviteCode).First(&thisUser).Error; err != nil { if err == gorm.ErrRecordNotFound { - return nil, errors.New("受邀请人不存在") + return nil, errors.New("邀请人不存在") } else { return nil, err }