Commit 0fc3341d authored by helinlin's avatar helinlin

修改巡检消息体存在null的问题

parent fbac271f
......@@ -66,7 +66,7 @@ public class AsyncTask {
private static final String TAB = "\r\n";
/**
* 检查消息推送
* @param checkId
......@@ -155,7 +155,6 @@ public class AsyncTask {
if (pointName != null) {
body += "关联检查点:" + pointName + TAB;
}
body = body.replaceAll(null, "").replaceAll("null", "");
saveAndSendMsg(orgCode, informerList, msgTypeEnum.getTitle(), body, msgTypeEnum.getMsgType(), latentDangerId, taskId, state,"");
}
......@@ -186,6 +185,8 @@ public class AsyncTask {
String title, String body, String msgType,
Long relationId, String taskId, Integer state,
String userRealName) {
body = body.replaceAll("null", "");//过滤掉所有null
if(body.startsWith(TAB)) body =body.replaceFirst(TAB,"");//过滤掉以换行开头的换行符
JSONArray array = JSONArray.parseArray(informerList);
Set<String> sendUserIds = new HashSet<>();
if (array.size()>0) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment