Commit f5485362 authored by KeYong's avatar KeYong

更新消息发送

parent 3a830e74
......@@ -1468,7 +1468,6 @@ public class MqttReceiveServiceImpl implements MqttReceiveService {
topicEntityVo.setTopic("equip/risk/trigger");
detailVo.setEquipInfo(equipInfoVo);
detailVo.setAlarmInfo(alarmInfoVo);
// topicEntityVo.setMessage(JSON.toJSONString(detailVo));
topicEntityVo.setData(JSON.toJSONString(detailVo));
mqttSendGateway.sendToMqtt(riskTopicCreate, JSON.toJSONString(topicEntityVo));
});
......
......@@ -105,6 +105,9 @@ public class CheckController extends AbstractBaseController {
@Value("${patrol.message.create.topic}")
private String patrolRiskCreateTopic;
@Value("${patrol.center.risk.topic}")
private String riskTopic;
@Autowired
private CheckMapper checkMapper;
......@@ -288,10 +291,10 @@ public class CheckController extends AbstractBaseController {
alarmInfoVo.setValue(String.valueOf(map.get("input_value")));
TopicEntityVo topicEntityVo = new TopicEntityVo();
topicEntityVo.setTopic(patrolRiskCreateTopic);
topicEntityVo.setTopic(riskTopic);
detailVo.setEquipInfo(equipInfoVo);
detailVo.setAlarmInfo(alarmInfoVo);
topicEntityVo.setMessage(JSON.toJSONString(detailVo));
topicEntityVo.setData(JSON.toJSONString(detailVo));
try {
webMqttComponent.publish(patrolRiskCreateTopic, JSON.toJSONString(topicEntityVo));
} catch (Exception e) {
......
......@@ -21,6 +21,8 @@ public class TopicEntityVo {
private String message;
private String data;
private String type;
// 若是车辆返回车牌号
......
......@@ -53,6 +53,8 @@ patrol.point.classify.topic=patrol/point/classify
patrol.topic=patrol/#
# \u7AD9\u7AEFmessage\u76D1\u542C\u4E3B\u9898
patrol.message.create.topic=emq.risk.created
# \u4E2D\u5FC3\u7EA7\u76D1\u542C\u4E3B\u9898
patrol.center.risk.topic=patrol/risk/trigger
#\u505C\u6B62\u901A\u8FC7WEB\u516C\u5F00\u6240\u6709\u7AEF\u70B9
#management.endpoints.web.exposure.exclude=*
## redis\u5931\u6548\u65F6\u95F4
......
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