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

@@ -31,11 +31,11 @@
<!--日志文件输出的文件名-->
<FileNamePattern>${LOG_HOME}/%d{yyyy-MM-dd}.%i.log</FileNamePattern>
<!--日志文件保留天数-->
<maxHistory>15</maxHistory>
<maxHistory>7</maxHistory>
<!--单个日志最大容量 至少10MB才能看得出来-->
<maxFileSize>60MB</maxFileSize>
<!--所有日志最多占多大容量-->
<totalSizeCap>20GB</totalSizeCap>
<totalSizeCap>60GB</totalSizeCap>
</rollingPolicy>
<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
<!--格式化输出:%d表示日期%thread表示线程名%-5level级别从左显示5个字符宽度%msg日志消息%n是换行符-->

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("消息发送失败");
// }
}
}