Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
open-source
/
glsx-smart-message-channel
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 ddcf1d0f
authored
Apr 28, 2021
by
111-PC\111
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
[+]pulsar消费服务
1 parent
09e0c6ab
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
1 deletions
src/main/java/cn/com/glsx/consumer/service/DeviceEventService.java
src/main/java/cn/com/glsx/consumer/service/DeviceEventService.java
View file @
ddcf1d0
...
...
@@ -44,12 +44,23 @@ public class DeviceEventService {
if
(
event
.
equals
(
"GW_BIND"
)||
event
.
equals
(
"SUB_DEV_BIND"
)){
deviceService
.
devBind
(
convertVo
(
index
));
}
else
if
(
event
.
equals
(
"GW_UN_BIND"
)||
event
.
equals
(
"SUB_DEV_UN_BIND"
)){
deviceService
.
devUnBind
(
convertVo
(
index
));
deviceService
.
devUnBind
(
convert
Delete
Vo
(
index
));
}
});
}
}
private
DeviceVo
convertDeleteVo
(
AqaraEventDetail
index
)
{
DeviceVo
deviceVo
=
new
DeviceVo
();
deviceVo
.
setDeviceId
(
index
.
getDid
());
deviceVo
.
setParentId
(
index
.
getParentId
());
deviceVo
.
setChannel
(
2
);
deviceVo
.
setPlatformProductId
(
index
.
getModel
());
deviceVo
.
setUid
(
index
.
getOpenId
());
deviceVo
.
setDeviceName
(
index
.
getName
());
return
deviceVo
;
}
private
DeviceVo
convertVo
(
AqaraEventDetail
index
)
{
DeviceVo
deviceVo
=
new
DeviceVo
();
deviceVo
.
setDeviceId
(
index
.
getDid
());
...
...
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