Merge remote-tracking branch 'origin/dev' into dev

This commit is contained in:
zt
2025-09-25 18:39:10 +08:00
2 changed files with 14 additions and 11 deletions

View File

@ -127,20 +127,17 @@ public class ChatGroupController {
for (ChatGroup chatGroup : list){ for (ChatGroup chatGroup : list){
setValue(chatGroup,userId); setValue(chatGroup,userId);
} }
if (searchObject != null && searchObject.getName() != null && !searchObject.getName().isEmpty()){ if (searchObject != null && searchObject.getName() != null && !searchObject.getName().isEmpty()){
return R.ok( return R.ok(
list.stream() list.stream()
.filter(chatGroup -> chatGroup.getName().contains(searchObject.getName())) .filter(chatGroup -> chatGroup.getName().contains(searchObject.getName()))
.toList()); .toList());
}else { }
}
return R.ok(list); return R.ok(list);
} }
}else {
return R.fail("没有数据");
}
}
/** /**
* 查看某个房间的详情信息 传递房间ID * 查看某个房间的详情信息 传递房间ID
*/ */

View File

@ -66,7 +66,12 @@ public class ChatFriendshipServiceImpl extends ServiceImpl<ChatFriendshipMapper,
.list(); .list();
Map<Long, List<SysUserFile>> userFileMap = userFileList.stream().collect(Collectors.groupingBy(SysUserFile::getUserId)); Map<Long, List<SysUserFile>> userFileMap = userFileList.stream().collect(Collectors.groupingBy(SysUserFile::getUserId));
userVoList.forEach(userVo -> { userVoList.forEach(userVo -> {
Long userId = userVo.getUserId(); Long userId = userVo.getUserId();
if (userId.equals(LoginHelper.getUserId())){
userVoList.remove(userVo);
}else {
if (userFileMap.containsKey(userId)) { if (userFileMap.containsKey(userId)) {
List<SysUserFile> fileList = userFileMap.get(userId); List<SysUserFile> fileList = userFileMap.get(userId);
String fileIdStr = fileList.stream() String fileIdStr = fileList.stream()
@ -74,6 +79,7 @@ public class ChatFriendshipServiceImpl extends ServiceImpl<ChatFriendshipMapper,
.collect(Collectors.joining(",")); .collect(Collectors.joining(","));
userVo.setFilePath(fileIdStr); userVo.setFilePath(fileIdStr);
} }
}
}); });
page.setRecords(userVoList); page.setRecords(userVoList);
} }