opt:消息通知修改

This commit is contained in:
2026-03-25 15:54:07 +08:00
parent c8bdb72dbf
commit 023c991b82
2 changed files with 8 additions and 11 deletions

View File

@@ -14,8 +14,6 @@ import lombok.extern.slf4j.Slf4j;
import org.nl.common.domain.query.PageQuery;
import org.nl.common.enums.NoticeEnum;
import org.nl.common.exception.BadRequestException;
import org.nl.common.mnt.websocket.MsgType;
import org.nl.common.mnt.websocket.SocketMsg;
import org.nl.common.mnt.websocket.WebSocketServer;
import org.nl.system.service.dict.dao.Dict;
import org.nl.system.service.dict.dao.mapper.SysDictMapper;
@@ -26,7 +24,6 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.io.IOException;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
@@ -173,12 +170,12 @@ public class SysNoticeServiceImpl extends ServiceImpl<SysNoticeMapper, SysNotice
sysNoticeMapper.insert(noticeDto);
JSONObject res = new JSONObject();
res.put("data", "notice_message_update");
SocketMsg messageInfo = new SocketMsg(res, MsgType.INFO);
try {
webSocketServer.sendInfo(messageInfo, "messageInfo");
} catch (IOException e) {
throw new BadRequestException("消息发送失败");
}
// SocketMsg messageInfo = new SocketMsg(res, MsgType.INFO);
// try {
// //webSocketServer.sendInfo(messageInfo, "messageInfo");
// } catch (IOException e) {
// throw new BadRequestException("消息发送失败");
// }
}
}