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
0af1887e
authored
Nov 08, 2023
by
huangjy
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
fix:设备上报缓存过期时间5秒
parent
15850ec9
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 @
0af1887e
...
...
@@ -103,15 +103,15 @@ public class PushCallback implements MqttCallback {
// TODO 先这样判断
if
(
headers
.
getProductName
().
contains
(
"呼吸"
))
{
redisTemplate
.
opsForValue
().
set
(
DEVICE_BR_DATA
+
device
.
getDeviceId
(),
JSON
.
toJSONString
(
device
.
getProperties
()),
1
000
,
TimeUnit
.
MILLISECONDS
);
5
000
,
TimeUnit
.
MILLISECONDS
);
}
if
(
headers
.
getProductName
().
contains
(
"空间"
))
{
redisTemplate
.
opsForValue
().
set
(
DEVICE_SPACE_DATA
+
device
.
getDeviceId
(),
JSON
.
toJSONString
(
device
.
getProperties
()),
1
000
,
TimeUnit
.
MILLISECONDS
);
5
000
,
TimeUnit
.
MILLISECONDS
);
}
if
(
headers
.
getProductName
().
contains
(
"跌倒"
))
{
redisTemplate
.
opsForValue
().
set
(
DEVICE_FALL_DATA
+
device
.
getDeviceId
(),
JSON
.
toJSONString
(
device
.
getProperties
()),
1
000
,
TimeUnit
.
MILLISECONDS
);
5
000
,
TimeUnit
.
MILLISECONDS
);
}
String
deviceId
=
device
.
getDeviceId
();
String
messageType
=
device
.
getMessageType
();
...
...
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