Commit fb27c1f4 authored by 赵啸非's avatar 赵啸非

修改redis 过期事件通知

parent 5c59f549
...@@ -167,7 +167,7 @@ public class DeviceMsgComsumerStartedService implements IApplicationStartedServi ...@@ -167,7 +167,7 @@ public class DeviceMsgComsumerStartedService implements IApplicationStartedServi
boolean bool = false; boolean bool = false;
DeviceEntity deviceEntity = deviceService.getExtCache(deviceReq.getDeviceCode()); DeviceEntity deviceEntity = deviceService.getExtCache(deviceReq.getDeviceCode());
if (!ObjectUtils.isEmpty(deviceEntity)) { if (!ObjectUtils.isEmpty(deviceEntity)) {
cacheService.hsetnx(RedisKey.KEY_DEVICE_ONLINE_CACHE + deviceEntity.getDeviceCode(), "", GlobalSysInfo.getParamIntValue(Constant.HEARTBEAT_TIMEOUT, 180)); cacheService.setnx(RedisKey.KEY_DEVICE_ONLINE_CACHE + deviceEntity.getDeviceCode(), "", GlobalSysInfo.getParamIntValue(Constant.HEARTBEAT_TIMEOUT, 180));
if (deviceEntity.getDeviceOnlineStatus() == DeviceOnlineStatusEnum.离线.getValue()) { if (deviceEntity.getDeviceOnlineStatus() == DeviceOnlineStatusEnum.离线.getValue()) {
bool = true; bool = true;
} }
......
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 to comment