Commit 381cd44c by HlQ

[add]

1.添加门店进出匹配率异常、单聚类、进店率异常指标
2.mall 信息添加营业时间字符串
1 parent 4f08c6c2
...@@ -58,6 +58,15 @@ public class MqttClientMessageListener { ...@@ -58,6 +58,15 @@ public class MqttClientMessageListener {
case STORE_CUSTOMER_UNDULATE: case STORE_CUSTOMER_UNDULATE:
handleStoreCustomerUndulate(jsonObj.toString()); handleStoreCustomerUndulate(jsonObj.toString());
break; break;
case STORE_INOUT_MATCH_RATIO:
handleStoreInoutMatchRatio(jsonObj.toString());
break;
case STORE_SINGLE_CLUSTER:
handleStoreSingleCluster(jsonObj.toString());
break;
case STORE_ENTER_RATIO:
handleStoreEnterRatio(jsonObj.toString());
break;
// endregion // endregion
// region mall 事件 // region mall 事件
case MALL_INOUT_DIFF: case MALL_INOUT_DIFF:
...@@ -138,6 +147,37 @@ public class MqttClientMessageListener { ...@@ -138,6 +147,37 @@ public class MqttClientMessageListener {
EventRecord eventRecord = JsonUtil.parseObject(payloadStr, EventRecord.class); EventRecord eventRecord = JsonUtil.parseObject(payloadStr, EventRecord.class);
recordService.save(eventRecord); recordService.save(eventRecord);
} }
/**
* 门店进出匹配率异常
*
* @param payloadStr 事件记录
*/
private void handleStoreInoutMatchRatio(String payloadStr) {
EventRecord eventRecord = JsonUtil.parseObject(payloadStr, EventRecord.class);
recordService.save(eventRecord);
}
/**
* 门店单聚类异常
*
* @param payloadStr 事件记录
*/
private void handleStoreSingleCluster(String payloadStr) {
EventRecord eventRecord = JsonUtil.parseObject(payloadStr, EventRecord.class);
recordService.save(eventRecord);
}
/**
* 门店进店率异常
*
* @param payloadStr 事件记录
*/
private void handleStoreEnterRatio(String payloadStr) {
EventRecord eventRecord = JsonUtil.parseObject(payloadStr, EventRecord.class);
recordService.save(eventRecord);
}
// endregion // endregion
// region mall 事件 // region mall 事件
......
package vion.model.monitor; package vion.model.monitor;
import com.baomidou.mybatisplus.annotation.*; import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.databind.JsonNode;
import lombok.Getter; import lombok.Getter;
import lombok.Setter; import lombok.Setter;
import vion.config.mp.JsonbTypeHandler; import vion.config.mp.JsonbTypeHandler;
...@@ -27,25 +28,25 @@ public class AgentRecord { ...@@ -27,25 +28,25 @@ public class AgentRecord {
* cpu信息 * cpu信息
*/ */
@TableField(value = "cpu_info", typeHandler = JsonbTypeHandler.class) @TableField(value = "cpu_info", typeHandler = JsonbTypeHandler.class)
private Object cpuInfo; private JsonNode cpuInfo;
/** /**
* 内存信息 * 内存信息
*/ */
@TableField(value = "memory_info", typeHandler = JsonbTypeHandler.class) @TableField(value = "memory_info", typeHandler = JsonbTypeHandler.class)
private Object memoryInfo; private JsonNode memoryInfo;
/** /**
* 磁盘信息 * 磁盘信息
*/ */
@TableField(value = "disk_info", typeHandler = JsonbTypeHandler.class) @TableField(value = "disk_info", typeHandler = JsonbTypeHandler.class)
private Object diskInfo; private JsonNode diskInfo;
/** /**
* 网络流量 * 网络流量
*/ */
@TableField(value = "network_info", typeHandler = JsonbTypeHandler.class) @TableField(value = "network_info", typeHandler = JsonbTypeHandler.class)
private Object networkInfo; private JsonNode networkInfo;
/** /**
* 启动时间 * 启动时间
......
package vion.model.monitor; package vion.model.monitor;
import com.baomidou.mybatisplus.annotation.*; import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.databind.JsonNode;
import lombok.Getter; import lombok.Getter;
import lombok.Setter; import lombok.Setter;
import vion.config.mp.JsonbTypeHandler; import vion.config.mp.JsonbTypeHandler;
...@@ -63,7 +64,7 @@ public class EventRecord { ...@@ -63,7 +64,7 @@ public class EventRecord {
* 上报数据 * 上报数据
*/ */
@TableField(value = "data", typeHandler = JsonbTypeHandler.class) @TableField(value = "data", typeHandler = JsonbTypeHandler.class)
private Object data; private JsonNode data;
@TableField(value = "create_time", fill = FieldFill.INSERT) @TableField(value = "create_time", fill = FieldFill.INSERT)
private LocalDateTime createTime; private LocalDateTime createTime;
......
...@@ -79,6 +79,12 @@ public class Mall { ...@@ -79,6 +79,12 @@ public class Mall {
private Integer deviceNum; private Integer deviceNum;
/** /**
* 营业时间字符串
*/
@TableField(value = "business_hour_str")
private String businessHourStr;
/**
* 备注 * 备注
*/ */
@TableField(value = "remark") @TableField(value = "remark")
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!