上传好友信息

This commit is contained in:
liwei1dao 2023-12-29 15:49:26 +08:00
parent 5e6e1a24a2
commit 7bcccce0f5
2 changed files with 3 additions and 1 deletions

View File

@ -115,7 +115,7 @@ func (this *apiComp) Addblack(session comm.IUserSession, req *pb.FriendAddBlackR
target.Beblackids = append(target.Beblackids, session.GetUserId()) target.Beblackids = append(target.Beblackids, session.GetUserId())
//更新 //更新
err = this.module.modelFriend.Change(target.Uid, map[string]interface{}{ err = this.module.modelFriend.Change(target.Uid, map[string]interface{}{
"beblackids": self.Beblackids, "beblackids": target.Beblackids,
}) })
if err != nil { if err != nil {
errdata = &pb.ErrorData{ errdata = &pb.ErrorData{

View File

@ -54,6 +54,7 @@ func (this *ModelFriend) GetFriend(uid string) (info *pb.DBFriend, err error) {
BlackIds: make([]string, 0), BlackIds: make([]string, 0),
GetZandIds: make([]string, 0), GetZandIds: make([]string, 0),
Record: make([]*pb.AssistRecord, 0), Record: make([]*pb.AssistRecord, 0),
Beblackids: make([]string, 0),
} }
err = this.Add(uid, info) err = this.Add(uid, info)
} }
@ -81,6 +82,7 @@ func (this *ModelFriend) GetFriends(uids []string) (friends []*pb.DBFriend, err
BlackIds: make([]string, 0), BlackIds: make([]string, 0),
GetZandIds: make([]string, 0), GetZandIds: make([]string, 0),
Record: make([]*pb.AssistRecord, 0), Record: make([]*pb.AssistRecord, 0),
Beblackids: make([]string, 0),
} }
err = this.Add(v, info) err = this.Add(v, info)
friends = append(friends, info) friends = append(friends, info)