Skip to content

Commit

Permalink
fix:邀请群成员重复问题
Browse files Browse the repository at this point in the history
  • Loading branch information
zongzibinbin committed Oct 21, 2023
1 parent 70152aa commit 0d2126f
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ public void addMember(Long uid, MemberAddReq request) {
AssertUtil.isNotEmpty(self, "您不是群成员");
List<Long> memberBatch = groupMemberDao.getMemberBatch(roomGroup.getId(), request.getUidList());
Set<Long> existUid = new HashSet<>(memberBatch);
List<Long> waitAddUidList = request.getUidList().stream().filter(a -> !existUid.contains(a)).collect(Collectors.toList());
List<Long> waitAddUidList = request.getUidList().stream().filter(a -> !existUid.contains(a)).distinct().collect(Collectors.toList());
if (CollectionUtils.isEmpty(waitAddUidList)) {
return;
}
Expand Down Expand Up @@ -350,7 +350,6 @@ private Map<Long, User> getFriendRoomMap(List<Long> roomIds, Long uid) {
return userBatch.get(friendUid);
}));
}

private Map<Long, RoomBaseInfo> getRoomBaseInfoMap(List<Long> roomIds, Long uid) {
Map<Long, Room> roomMap = roomCache.getBatch(roomIds);
//房间根据好友和群组类型分组
Expand Down

0 comments on commit 0d2126f

Please sign in to comment.