Commit 3db714ef authored by tangwei's avatar tangwei

修改bug

parent 5cb44c11
......@@ -50,10 +50,10 @@ public class StartLoader implements ApplicationRunner {
if (!ValidationUtil.isEmpty(obj)) {
JSONObject json = JSON.parseObject(obj);
AlertNewsDto alertNewsDto = new AlertNewsDto( "物联警情",
"物联设备发生警情,发生位置:"+json.get("address")!=null?json.get("address").toString():""+
",事发单位:"+json.get("unitInvolvedName")!=null?json.get("unitInvolvedName").toString():""
+",联系人:"+json.get("contactUser")!=null?json.get("contactUser").toString():""
+",联系电话:"+json.get("contactPhone")!=null?json.get("contactPhone").toString():""+".请尽快处理!",
"物联设备发生警情,发生位置:"+(json.get("address")!=null?json.get("address").toString():"")+
",事发单位:"+(json.get("unitInvolvedName")!=null?json.get("unitInvolvedName").toString():"")
+",联系人:"+(json.get("contactUser")!=null?json.get("contactUser").toString():"")
+",联系电话:"+(json.get("contactPhone")!=null?json.get("contactPhone").toString():"")+".请尽快处理!",
json.get("id").toString(), json);
emqKeeper.getMqttClient().publish(topicweb, JSONObject.toJSON(alertNewsDto).toString().getBytes("UTF-8"), 1, false);
}
......
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