mirror of
https://github.com/zongzibinbin/MallChat.git
synced 2025-12-26 04:47:53 +08:00
fix:邀请群成员重复问题
This commit is contained in:
parent
70152aaade
commit
0d2126f859
@ -222,7 +222,7 @@ public class RoomAppServiceImpl implements RoomAppService {
|
||||
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;
|
||||
}
|
||||
@ -350,7 +350,6 @@ public class RoomAppServiceImpl implements RoomAppService {
|
||||
return userBatch.get(friendUid);
|
||||
}));
|
||||
}
|
||||
|
||||
private Map<Long, RoomBaseInfo> getRoomBaseInfoMap(List<Long> roomIds, Long uid) {
|
||||
Map<Long, Room> roomMap = roomCache.getBatch(roomIds);
|
||||
//房间根据好友和群组类型分组
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user