mirror of
https://github.com/continew-org/continew-admin.git
synced 2025-09-09 08:57:16 +08:00
fix(system/message): 修复全部已读无效
This commit is contained in:
@@ -76,7 +76,9 @@ public class MessageServiceImpl implements MessageService {
|
||||
// 查询当前用户的未读消息
|
||||
List<MessageDO> list = baseMapper.selectUnreadListByUserId(userId);
|
||||
List<Long> unreadIds = list.stream().map(MessageDO::getId).toList();
|
||||
messageLogService.addWithUserId(CollUtil.intersection(unreadIds, ids).stream().toList(), userId);
|
||||
messageLogService.addWithUserId(CollUtil.isNotEmpty(ids)
|
||||
? CollUtil.intersection(unreadIds, ids).stream().toList()
|
||||
: unreadIds, userId);
|
||||
WebSocketUtils.sendMessage(StpUtil.getTokenValueByLoginId(userId), String.valueOf(baseMapper
|
||||
.selectUnreadListByUserId(userId)
|
||||
.size()));
|
||||
|
Reference in New Issue
Block a user