Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
黄嘉阳
/
iot-platform-server
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
c2cdb936
authored
Oct 12, 2023
by
huangjy
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
fix: 修复bug
parent
5c9d7b6e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
server-web/src/main/java/com/makeit/mqtt/PushCallback.java
server-web/src/main/java/com/makeit/mqtt/PushCallback.java
View file @
c2cdb936
...
@@ -109,15 +109,15 @@ public class PushCallback implements MqttCallback {
...
@@ -109,15 +109,15 @@ public class PushCallback implements MqttCallback {
// TODO 先这样判断
// TODO 先这样判断
if
(
headers
.
getProductName
().
contains
(
"呼吸"
))
{
if
(
headers
.
getProductName
().
contains
(
"呼吸"
))
{
redisTemplate
.
opsForValue
().
set
(
DEVICE_BR_DATA
+
device
.
getDeviceId
(),
JSON
.
toJSONString
(
device
.
getProperties
()),
redisTemplate
.
opsForValue
().
set
(
DEVICE_BR_DATA
+
device
.
getDeviceId
(),
JSON
.
toJSONString
(
device
.
getProperties
()),
1
,
TimeUnit
.
SECONDS
);
1
200
,
TimeUnit
.
MILLI
SECONDS
);
}
}
if
(
headers
.
getProductName
().
contains
(
"空间"
))
{
if
(
headers
.
getProductName
().
contains
(
"空间"
))
{
redisTemplate
.
opsForValue
().
set
(
DEVICE_SPACE_DATA
+
device
.
getDeviceId
(),
JSON
.
toJSONString
(
device
.
getProperties
()),
redisTemplate
.
opsForValue
().
set
(
DEVICE_SPACE_DATA
+
device
.
getDeviceId
(),
JSON
.
toJSONString
(
device
.
getProperties
()),
1
,
TimeUnit
.
SECONDS
);
1
200
,
TimeUnit
.
MILLI
SECONDS
);
}
}
if
(
headers
.
getProductName
().
contains
(
"跌倒"
))
{
if
(
headers
.
getProductName
().
contains
(
"跌倒"
))
{
redisTemplate
.
opsForValue
().
set
(
DEVICE_FALL_DATA
+
device
.
getDeviceId
(),
JSON
.
toJSONString
(
device
.
getProperties
()),
redisTemplate
.
opsForValue
().
set
(
DEVICE_FALL_DATA
+
device
.
getDeviceId
(),
JSON
.
toJSONString
(
device
.
getProperties
()),
1
,
TimeUnit
.
SECONDS
);
1
200
,
TimeUnit
.
MILLI
SECONDS
);
}
}
for
(
HeaderInfo
.
Bind
binding
:
bindings
)
{
for
(
HeaderInfo
.
Bind
binding
:
bindings
)
{
try
{
try
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment