Commit 070332e7 authored by KeYong's avatar KeYong

修改消息msgContext格式

parent 434161cf
...@@ -246,8 +246,11 @@ public class ContingencyPlanServiceImpl implements IContingencyPlanService { ...@@ -246,8 +246,11 @@ public class ContingencyPlanServiceImpl implements IContingencyPlanService {
String topic = String.format("/%s/%s/%s", serviceName, stationName, "plan"); String topic = String.format("/%s/%s/%s", serviceName, stationName, "plan");
Map<String, Object> map = new HashMap<>(); Map<String, Object> map = new HashMap<>();
JSONObject msgContext = new JSONObject();
msgContext.put("content", "startPlan");
map.put("contingency", new ContingencyRo()); map.put("contingency", new ContingencyRo());
map.put("msgContext", "{\"content\":\"startPlan\"}"); // map.put("msgContext", "{\"content\":\"startPlan\"}");
map.put("msgContext", msgContext);
map.put("msgType", "refreshRecord"); map.put("msgType", "refreshRecord");
webMqttComponent.publish(topic, JSON.toJSONString(map)); webMqttComponent.publish(topic, JSON.toJSONString(map));
} }
......
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