Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
open-source
/
glsx-smart-device-kafka-consumer
This project
Loading...
Sign in
Toggle navigation
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 79dd3e4a
authored
Apr 15, 2021
by
111-PC\111
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
[+]kafka消费数据修改
1 parent
54e2ee6a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
2 deletions
src/main/java/cn/com/glsx/smart/service/SmartDeviceStatusService.java
src/main/java/cn/com/glsx/smart/vo/Event.java
src/main/java/cn/com/glsx/smart/service/SmartDeviceStatusService.java
View file @
79dd3e4
...
@@ -23,7 +23,8 @@ public class SmartDeviceStatusService {
...
@@ -23,7 +23,8 @@ public class SmartDeviceStatusService {
private
SceneService
sceneService
;
private
SceneService
sceneService
;
public
void
saveEvent
(
Event
event
)
{
public
void
saveEvent
(
Event
event
)
{
SmartDevideStatus
smartDevideStatus
=
smartDevideStatusMapper
.
findDevStatusByIdAndCode
(
event
.
getSn
(),
Constants
.
MACHINE_STATUS_ORDER
);
log
.
info
(
"开始消费,设备{}号,操作{}"
,
event
.
getSn
(),
event
);
SmartDevideStatus
smartDevideStatus
=
smartDevideStatusMapper
.
findDevStatusByIdAndCode
(
event
.
getSn
(),
event
.
getDeviceType
());
if
(
smartDevideStatus
==
null
){
if
(
smartDevideStatus
==
null
){
smartDevideStatus
=
new
SmartDevideStatus
();
smartDevideStatus
=
new
SmartDevideStatus
();
smartDevideStatus
.
setDeviceOrderCode
(
event
.
getDeviceType
());
smartDevideStatus
.
setDeviceOrderCode
(
event
.
getDeviceType
());
...
...
src/main/java/cn/com/glsx/smart/vo/Event.java
View file @
79dd3e4
...
@@ -104,10 +104,11 @@ public class Event implements Serializable{
...
@@ -104,10 +104,11 @@ public class Event implements Serializable{
"userId='"
+
userId
+
'\''
+
"userId='"
+
userId
+
'\''
+
", sn='"
+
sn
+
'\''
+
", sn='"
+
sn
+
'\''
+
", type='"
+
type
+
'\''
+
", type='"
+
type
+
'\''
+
", time=
'"
+
time
+
'\''
+
", time=
"
+
time
+
", deviceType='"
+
deviceType
+
'\''
+
", deviceType='"
+
deviceType
+
'\''
+
", accessTime='"
+
accessTime
+
'\''
+
", accessTime='"
+
accessTime
+
'\''
+
", receiveTime='"
+
receiveTime
+
'\''
+
", receiveTime='"
+
receiveTime
+
'\''
+
", value='"
+
value
+
'\''
+
'}'
;
'}'
;
}
}
}
}
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