开放好友列表接口

This commit is contained in:
wh_zcy 2022-09-08 15:48:45 +08:00
parent 5e2eba49d4
commit 6584cb33e9
2 changed files with 9 additions and 0 deletions

View File

@ -126,6 +126,8 @@ type (
ResetFriend(uid string)
// 获取好友数量
GetFriendCount(uid string) int32
// 获取好友列表
GetFriendList(uid string) []string
}
//聊天系统

View File

@ -67,3 +67,10 @@ func (this *Friend) GetFriendCount(uid string) (count int32) {
}
return
}
func (this *Friend) GetFriendList(uid string) (uids []string) {
if friend := this.modelFriend.GetFriend(uid); friend != nil {
uids = friend.FriendIds
}
return
}