From 7bcccce0f5db8b6491fba5be9b4fe0626437fa22 Mon Sep 17 00:00:00 2001 From: liwei1dao Date: Fri, 29 Dec 2023 15:49:26 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E5=A5=BD=E5=8F=8B=E4=BF=A1?= =?UTF-8?q?=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/friend/api_cross_addblack.go | 2 +- modules/friend/model_friend.go | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/friend/api_cross_addblack.go b/modules/friend/api_cross_addblack.go index f77ec927f..96d4e22ad 100644 --- a/modules/friend/api_cross_addblack.go +++ b/modules/friend/api_cross_addblack.go @@ -115,7 +115,7 @@ func (this *apiComp) Addblack(session comm.IUserSession, req *pb.FriendAddBlackR target.Beblackids = append(target.Beblackids, session.GetUserId()) //更新 err = this.module.modelFriend.Change(target.Uid, map[string]interface{}{ - "beblackids": self.Beblackids, + "beblackids": target.Beblackids, }) if err != nil { errdata = &pb.ErrorData{ diff --git a/modules/friend/model_friend.go b/modules/friend/model_friend.go index f12b1c7cd..0ea7cecdf 100644 --- a/modules/friend/model_friend.go +++ b/modules/friend/model_friend.go @@ -54,6 +54,7 @@ func (this *ModelFriend) GetFriend(uid string) (info *pb.DBFriend, err error) { BlackIds: make([]string, 0), GetZandIds: make([]string, 0), Record: make([]*pb.AssistRecord, 0), + Beblackids: make([]string, 0), } err = this.Add(uid, info) } @@ -81,6 +82,7 @@ func (this *ModelFriend) GetFriends(uids []string) (friends []*pb.DBFriend, err BlackIds: make([]string, 0), GetZandIds: make([]string, 0), Record: make([]*pb.AssistRecord, 0), + Beblackids: make([]string, 0), } err = this.Add(v, info) friends = append(friends, info)