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 cb41a43d
authored
Apr 16, 2021
by
111-PC\111
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
[+]kafka消费数据修改
1 parent
9c17576f
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
6 deletions
src/main/java/cn/com/glsx/smart/commons/Constants.java
src/main/java/cn/com/glsx/smart/queue/LeaveHomeFlagConsumer.java
src/main/java/cn/com/glsx/smart/vo/Fence.java
src/main/java/cn/com/glsx/smart/commons/Constants.java
View file @
cb41a43
...
...
@@ -12,10 +12,5 @@ public class Constants {
public
static
final
String
MACHINE_STATUS_ORDER
=
"machine_status"
;
// 机器离家指令
public
static
final
String
MACHINE_LEAVE_ORDER
=
"leavehome_flag"
;
}
// 机器点火指令
public
static
final
String
MACHINE_STATUS_IN_VALUE
=
"true"
;
// 机器火指令
public
static
final
String
MACHINE_STATUS_FAM_ORDER
=
"false"
;
}
\ No newline at end of file
src/main/java/cn/com/glsx/smart/queue/LeaveHomeFlagConsumer.java
View file @
cb41a43
...
...
@@ -4,12 +4,14 @@ import cn.com.glsx.smart.queue.base.MessageReceiver;
import
cn.com.glsx.smart.service.SmartDeviceStatusService
;
import
cn.com.glsx.smart.utils.ProtobufConvert
;
import
cn.com.glsx.smart.vo.Event
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
/**
* @author zhouhaibao
* @date 2021/4/9 18:14
*/
@Slf4j
public
class
LeaveHomeFlagConsumer
extends
MessageReceiver
{
@Autowired
...
...
@@ -17,6 +19,7 @@ public class LeaveHomeFlagConsumer extends MessageReceiver {
@Override
public
void
processMessage
(
String
topic
,
byte
[]
message
)
{
log
.
info
(
"topic{}开始消费"
,
topic
);
Event
event
=
ProtobufConvert
.
convertLeaveHome
(
message
);
if
(
event
==
null
)
{
return
;
...
...
src/main/java/cn/com/glsx/smart/vo/Fence.java
View file @
cb41a43
This diff is collapsed.
Click to expand it.
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