Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation
This project
Loading...
Sign in
李苗
/
Vion-DevOps
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 381cd44c
authored
Nov 07, 2024
by
HlQ
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
[add]
1.添加门店进出匹配率异常、单聚类、进店率异常指标 2.mall 信息添加营业时间字符串
1 parent
4f08c6c2
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
53 additions
and
5 deletions
src/main/java/vion/event/mqtt/MqttClientMessageListener.java
src/main/java/vion/model/monitor/AgentRecord.java
src/main/java/vion/model/monitor/EventRecord.java
src/main/java/vion/model/monitor/Mall.java
src/main/java/vion/event/mqtt/MqttClientMessageListener.java
View file @
381cd44
...
@@ -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 事件
...
...
src/main/java/vion/model/monitor/AgentRecord.java
View file @
381cd44
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
;
/**
/**
* 启动时间
* 启动时间
...
...
src/main/java/vion/model/monitor/EventRecord.java
View file @
381cd44
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
;
...
...
src/main/java/vion/model/monitor/Mall.java
View file @
381cd44
...
@@ -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"
)
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment