Commit c2cdb936 by huangjy

fix: 修复bug

parent 5c9d7b6e
...@@ -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); 1200, TimeUnit.MILLISECONDS);
} }
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); 1200, TimeUnit.MILLISECONDS);
} }
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); 1200, TimeUnit.MILLISECONDS);
} }
for (HeaderInfo.Bind binding : bindings) { for (HeaderInfo.Bind binding : bindings) {
try { try {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment