Commit 0dc30233 by 姚冰

[add] 客流数据中断事件添加

1 parent 571762e0
......@@ -8,9 +8,11 @@ import java.util.Arrays;
public enum MqttMessageType {
REGISTER("REGISTER"),
DEVICE_OFFLINE("DEVICE_OFFLINE"),
DEVICE_OFFLINE("DEVICE_OFFLINE"), //设备离线
UPGRADE("UPGRADE"),
WHOLEDAY_ANALYZE("WHOLE_ANALYZE_EXCEPTION");
WHOLEDAY_ANALYZE("WHOLE_ANALYZE_EXCEPTION"), //全天分析异常
DEVICE_REGISTRATION("DEVICE_REGISTRATION"), //设备注册次数异常
PASSENGER_FLOW_INTERRUPT("PASSENGER_FLOW_INTERRUPT"); //客流数据中断
private final String type;
......
......@@ -63,6 +63,10 @@ public class MqttClientMessageListener {
//全天分析异常
handleWholeDayAnalyze(payloadStr);
break;
case MqttMessageType.PASSENGER_FLOW_INTERRUPT:
//客流数据中断
handlePassengerFlowInterrupt(payloadStr);
break;
default:
log.info("未定义的消息类型:{}, payload:{}", type, payloadStr);
break;
......@@ -130,5 +134,11 @@ public class MqttClientMessageListener {
EventRecord eventRecord = JsonUtil.parseObject(payloadStr, EventRecord.class);
recordService.save(eventRecord);
}
//客流数据中断
private void handlePassengerFlowInterrupt(String payloadStr) {
EventRecord eventRecord = JsonUtil.parseObject(payloadStr, EventRecord.class);
recordService.save(eventRecord);
}
}
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!