From 612fe2173e3422aef5db38ba992a7786a88a959c Mon Sep 17 00:00:00 2001 From: wangchuxiao Date: Mon, 6 Mar 2023 12:07:25 +0800 Subject: [PATCH] modify dictory --- internal/rpc/friend/friend.go | 2 +- pkg/common/db/controller/friend.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/internal/rpc/friend/friend.go b/internal/rpc/friend/friend.go index 5f91080db..c6bd58047 100644 --- a/internal/rpc/friend/friend.go +++ b/internal/rpc/friend/friend.go @@ -244,7 +244,7 @@ func (s *friendServer) GetFriendIDs(ctx context.Context, req *pbfriend.GetFriend return nil, err } resp = &pbfriend.GetFriendIDsResp{} - resp.FriendIDs, err = s.FriendDatabase.GetFriendIDs(ctx, req.UserID) + resp.FriendIDs, err = s.FriendDatabase.FindFriendUserIDs(ctx, req.UserID) if err != nil { return nil, err } diff --git a/pkg/common/db/controller/friend.go b/pkg/common/db/controller/friend.go index 80e8aae88..b652f2e02 100644 --- a/pkg/common/db/controller/friend.go +++ b/pkg/common/db/controller/friend.go @@ -35,7 +35,7 @@ type FriendDatabase interface { PageFriendRequestToMe(ctx context.Context, userID string, pageNumber, showNumber int32) (friends []*relation.FriendRequestModel, total int64, err error) // 获取某人指定好友的信息 FindFriendsWithError(ctx context.Context, ownerUserID string, friendUserIDs []string) (friends []*relation.FriendModel, err error) - GetFriendIDs(ctx context.Context, ownerUserID string) (friendUserIDs []string, err error) + FindFriendUserIDs(ctx context.Context, ownerUserID string) (friendUserIDs []string, err error) } type friendDatabase struct { @@ -240,6 +240,6 @@ func (f *friendDatabase) FindFriendsWithError(ctx context.Context, ownerUserID s return } -func (f *friendDatabase) GetFriendIDs(ctx context.Context, ownerUserID string) (friendUserIDs []string, err error) { +func (f *friendDatabase) FindFriendUserIDs(ctx context.Context, ownerUserID string) (friendUserIDs []string, err error) { return f.friend.FindFriendUserIDs(ctx, ownerUserID) }