From 6584cb33e9c861297e0f82ac165748b35f59b129 Mon Sep 17 00:00:00 2001 From: wh_zcy Date: Thu, 8 Sep 2022 15:48:45 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BC=80=E6=94=BE=E5=A5=BD=E5=8F=8B=E5=88=97?= =?UTF-8?q?=E8=A1=A8=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- comm/imodule.go | 2 ++ modules/friend/module.go | 7 +++++++ 2 files changed, 9 insertions(+) diff --git a/comm/imodule.go b/comm/imodule.go index 742190dbb..d8cc37d53 100644 --- a/comm/imodule.go +++ b/comm/imodule.go @@ -126,6 +126,8 @@ type ( ResetFriend(uid string) // 获取好友数量 GetFriendCount(uid string) int32 + // 获取好友列表 + GetFriendList(uid string) []string } //聊天系统 diff --git a/modules/friend/module.go b/modules/friend/module.go index e4f199bb4..454435a69 100644 --- a/modules/friend/module.go +++ b/modules/friend/module.go @@ -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 +}