mirror of
https://github.com/continew-org/continew-admin.git
synced 2025-09-09 20:57:21 +08:00
fix: 已读消息后增加消息推送
This commit is contained in:
@@ -71,6 +71,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);
|
||||
WebSocketUtils.sendMessage(StpUtil.getTokenValueByLoginId(userId), String.valueOf(baseMapper
|
||||
.selectUnreadListByUserId(userId)
|
||||
.size()));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Reference in New Issue
Block a user