09-25-完善功能

This commit is contained in:
2025-09-25 17:34:47 +08:00
parent af83c40d98
commit 23eab88db1
2 changed files with 14 additions and 11 deletions

View File

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

View File

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