opt:消息通知修改
This commit is contained in:
@@ -31,11 +31,11 @@
|
|||||||
<!--日志文件输出的文件名-->
|
<!--日志文件输出的文件名-->
|
||||||
<FileNamePattern>${LOG_HOME}/%d{yyyy-MM-dd}.%i.log</FileNamePattern>
|
<FileNamePattern>${LOG_HOME}/%d{yyyy-MM-dd}.%i.log</FileNamePattern>
|
||||||
<!--日志文件保留天数-->
|
<!--日志文件保留天数-->
|
||||||
<maxHistory>15</maxHistory>
|
<maxHistory>7</maxHistory>
|
||||||
<!--单个日志最大容量 至少10MB才能看得出来-->
|
<!--单个日志最大容量 至少10MB才能看得出来-->
|
||||||
<maxFileSize>60MB</maxFileSize>
|
<maxFileSize>60MB</maxFileSize>
|
||||||
<!--所有日志最多占多大容量-->
|
<!--所有日志最多占多大容量-->
|
||||||
<totalSizeCap>20GB</totalSizeCap>
|
<totalSizeCap>60GB</totalSizeCap>
|
||||||
</rollingPolicy>
|
</rollingPolicy>
|
||||||
<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
|
<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
|
||||||
<!--格式化输出:%d表示日期,%thread表示线程名,%-5level:级别从左显示5个字符宽度%msg:日志消息,%n是换行符-->
|
<!--格式化输出:%d表示日期,%thread表示线程名,%-5level:级别从左显示5个字符宽度%msg:日志消息,%n是换行符-->
|
||||||
|
|||||||
@@ -14,8 +14,6 @@ import lombok.extern.slf4j.Slf4j;
|
|||||||
import org.nl.common.domain.query.PageQuery;
|
import org.nl.common.domain.query.PageQuery;
|
||||||
import org.nl.common.enums.NoticeEnum;
|
import org.nl.common.enums.NoticeEnum;
|
||||||
import org.nl.common.exception.BadRequestException;
|
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.common.mnt.websocket.WebSocketServer;
|
||||||
import org.nl.system.service.dict.dao.Dict;
|
import org.nl.system.service.dict.dao.Dict;
|
||||||
import org.nl.system.service.dict.dao.mapper.SysDictMapper;
|
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 org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import java.io.IOException;
|
|
||||||
import java.util.LinkedList;
|
import java.util.LinkedList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
@@ -173,12 +170,12 @@ public class SysNoticeServiceImpl extends ServiceImpl<SysNoticeMapper, SysNotice
|
|||||||
sysNoticeMapper.insert(noticeDto);
|
sysNoticeMapper.insert(noticeDto);
|
||||||
JSONObject res = new JSONObject();
|
JSONObject res = new JSONObject();
|
||||||
res.put("data", "notice_message_update");
|
res.put("data", "notice_message_update");
|
||||||
SocketMsg messageInfo = new SocketMsg(res, MsgType.INFO);
|
// SocketMsg messageInfo = new SocketMsg(res, MsgType.INFO);
|
||||||
try {
|
// try {
|
||||||
webSocketServer.sendInfo(messageInfo, "messageInfo");
|
// //webSocketServer.sendInfo(messageInfo, "messageInfo");
|
||||||
} catch (IOException e) {
|
// } catch (IOException e) {
|
||||||
throw new BadRequestException("消息发送失败");
|
// throw new BadRequestException("消息发送失败");
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user