增加了通知中的service字段

This commit is contained in:
wanggeng 2021-07-22 22:59:45 +08:00
parent 1455a07772
commit ab58ad626e
2 changed files with 17 additions and 1 deletions

View File

@ -219,6 +219,7 @@ public class AppSocketMessage {
private String title;
private String msg;
private String target;
private String serviceId;
public NoticeBody() {
}
@ -234,6 +235,13 @@ public class AppSocketMessage {
this.target = target;
}
public NoticeBody(String title, String msg, String target, String serviceId) {
this.title = title;
this.msg = msg;
this.target = target;
this.serviceId = serviceId;
}
public String getTitle() {
return title == null ? "" : title;
}
@ -257,6 +265,14 @@ public class AppSocketMessage {
public void setTarget(String target) {
this.target = target;
}
public String getServiceId() {
return serviceId;
}
public void setServiceId(String serviceId) {
this.serviceId = serviceId;
}
}
public static class CountNeedToDealWithBody {

View File

@ -102,7 +102,7 @@ public class MessageServiceImpl extends AbstractService implements IMessageServi
scheduledExecutorService.schedule(() -> {
for (AppSocketSession appSocketSession : appSocketSessions) {
Session session = appSocketSession.getSession();
AppSocketMessage.NoticeBody noticeBody = new AppSocketMessage.NoticeBody(notice.getTitle(), notice.getMsg(), notice.getTarget());
AppSocketMessage.NoticeBody noticeBody = new AppSocketMessage.NoticeBody(notice.getTitle(), notice.getMsg(), notice.getTarget(), notice.getServiceId());
AppSocketMessage appSocketMessage = new AppSocketMessage(AppSocketTypeEnum.NOTICE_TARGET_MESSAGE.getValue(),
true,
AppSocketSessionManager.FORM_SYSTEM,