调整邮件逻辑和展示
This commit is contained in:
parent
4c640b5a6c
commit
b07147e1b3
@ -272,8 +272,8 @@ public class ClientExceptionServiceImpl extends AbstractService implements IClie
|
|||||||
private String getExceptionEmailContent(String leaderName, String noticeContent) {
|
private String getExceptionEmailContent(String leaderName, String noticeContent) {
|
||||||
StringBuilder noticeContentTable = new StringBuilder();
|
StringBuilder noticeContentTable = new StringBuilder();
|
||||||
noticeContentTable.append("<div>").append(leaderName).append(",您好:</div>");
|
noticeContentTable.append("<div>").append(leaderName).append(",您好:</div>");
|
||||||
noticeContentTable.append("<div>您所负责的项目出现异,请及时处理更新</div><br/>");
|
noticeContentTable.append("<div>您所负责的项目有异常发生,请及时处理并更新</div><br/>");
|
||||||
noticeContentTable.append("<div>异常情况见下表,详细问题请登录管理系统查看:</div><br/>");
|
noticeContentTable.append("<div>异常情况见下表,详细内容请登录管理系统查看:</div><br/>");
|
||||||
noticeContentTable.append("<table border=\"1\" cellspacing=\"0\">");
|
noticeContentTable.append("<table border=\"1\" cellspacing=\"0\">");
|
||||||
noticeContentTable.append("<thead><tr><th>系统</th><th>异常类型</th><th>异常名称</th><th>异常时间</th></thread>");
|
noticeContentTable.append("<thead><tr><th>系统</th><th>异常类型</th><th>异常名称</th><th>异常时间</th></thread>");
|
||||||
noticeContentTable.append("<tbody>");
|
noticeContentTable.append("<tbody>");
|
||||||
|
@ -75,7 +75,7 @@ public class OffLineServiceImpl extends BaseService implements IOffLineService {
|
|||||||
// 查询客户端负责人
|
// 查询客户端负责人
|
||||||
ClientProjectLeaderDTO clientProjectLeaderDTO = projectLeaderService.getProjectLeaderByClientId(socketClientBO.getClientId());
|
ClientProjectLeaderDTO clientProjectLeaderDTO = projectLeaderService.getProjectLeaderByClientId(socketClientBO.getClientId());
|
||||||
if (clientProjectLeaderDTO == null) {
|
if (clientProjectLeaderDTO == null) {
|
||||||
LOG.debug("ClientId: {},没有设置项目负责人");
|
LOG.debug("ClientId: {},没有设置项目负责人", socketClientBO.getClientId());
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
String emailKey = clientProjectLeaderDTO.getLeaderEmail();
|
String emailKey = clientProjectLeaderDTO.getLeaderEmail();
|
||||||
@ -87,6 +87,8 @@ public class OffLineServiceImpl extends BaseService implements IOffLineService {
|
|||||||
List<String> noticeList = noticeMap.get(emailKey);
|
List<String> noticeList = noticeMap.get(emailKey);
|
||||||
if (noticeList == null) {
|
if (noticeList == null) {
|
||||||
noticeList = new ArrayList<>();
|
noticeList = new ArrayList<>();
|
||||||
|
// 列表的第一个是项目经理
|
||||||
|
noticeList.add(clientProjectLeaderDTO.getLeaderName());
|
||||||
noticeMap.put(emailKey, noticeList);
|
noticeMap.put(emailKey, noticeList);
|
||||||
}
|
}
|
||||||
noticeList.add(noticeContentSB.toString());
|
noticeList.add(noticeContentSB.toString());
|
||||||
@ -109,11 +111,13 @@ public class OffLineServiceImpl extends BaseService implements IOffLineService {
|
|||||||
for (Map.Entry<String, List<String>> notice : noticeMap.entrySet()) {
|
for (Map.Entry<String, List<String>> notice : noticeMap.entrySet()) {
|
||||||
String receiverEmail = notice.getKey();
|
String receiverEmail = notice.getKey();
|
||||||
StringBuilder noticeContentTable = new StringBuilder();
|
StringBuilder noticeContentTable = new StringBuilder();
|
||||||
noticeContentTable.append("<div>您好,您所负责的项目出现异常离线情况,请及时处理,如果是主动离线请忽略</div><br/>");
|
noticeContentTable.append("<div>").append(notice.getValue().get(0)).append(",您好").append("</div>");
|
||||||
|
noticeContentTable.append("<div>").append("您所负责的项目出现异常离线情况,请及时处理,如果是主动离线请忽略</div><br/>");
|
||||||
noticeContentTable.append("<div>详细情况见下表:</div><br/>");
|
noticeContentTable.append("<div>详细情况见下表:</div><br/>");
|
||||||
noticeContentTable.append("<table border=\"1\" cellspacing=\"0\">");
|
noticeContentTable.append("<table border=\"1\" cellspacing=\"0\">");
|
||||||
noticeContentTable.append("<thead><tr><th>系统</th><th>所属客户</th><th>服务器IP</th><th>离线时间</th></thread>");
|
noticeContentTable.append("<thead><tr><th>系统</th><th>所属客户</th><th>访问地址</th><th>离线时间</th></thread>");
|
||||||
noticeContentTable.append("<tbody>");
|
noticeContentTable.append("<tbody>");
|
||||||
|
notice.getValue().remove(0);
|
||||||
for (String tbodyTr : notice.getValue()) {
|
for (String tbodyTr : notice.getValue()) {
|
||||||
noticeContentTable.append(tbodyTr);
|
noticeContentTable.append(tbodyTr);
|
||||||
}
|
}
|
||||||
|
@ -111,7 +111,7 @@
|
|||||||
min: 0,
|
min: 0,
|
||||||
max: disk.total,
|
max: disk.total,
|
||||||
detail: {formatter: '{value}GB'},
|
detail: {formatter: '{value}GB'},
|
||||||
data: [{value: disk.free, name: '磁盘使用'}]
|
data: [{value: (disk.total - disk.free), name: '磁盘使用'}]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user