fix: 通知公告和字典重构问题修复

This commit is contained in:
ray
2024-10-08 00:40:01 +08:00
parent 3fadc0bb96
commit 2f01e054a4
13 changed files with 58 additions and 25 deletions

View File

@@ -222,11 +222,11 @@ public class NoticeServiceImpl extends ServiceImpl<NoticeMapper, Notice> impleme
// 找出在线用户的通知接收者
Set<String> onlineReceivers = new HashSet<>(CollectionUtil.intersection(receivers, allOnlineUsers));
NoticeDTO noticeDTO = new NoticeDTO();
noticeDTO.setId(id);
noticeDTO.setTitle(notice.getTitle());
noticeDTO.setType(notice.getType());
noticeDTO.setPublishTime(notice.getPublishTime());
onlineReceivers.forEach(receiver -> messagingTemplate.convertAndSendToUser(receiver, "/queue/message", noticeDTO));
}