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

更新下发消息为线程池发送

parent 9f845e72
......@@ -177,7 +177,7 @@ public class DeviceMsgComsumerStartedService implements IApplicationStartedServi
condition.setOnlineTime(new Date());
condition.setDeviceStatus(DeviceStatusEnum.在线.getValue());
cacheService.lpush(RedisKey.KEY_DEVICE_UPDATE_QUEUE,deviceEntity);
cacheService.lpush(RedisKey.KEY_DEVICE_UPDATE_QUEUE,condition);
// deviceService.update(deviceEntity);
PlatformEntity platformEntity = platformService.getCache(deviceEntity.getPlatformId().toString());
......
......@@ -78,9 +78,11 @@ public class DeviceStatTaskImpl implements ITaskExcuteService {
if (ObjectUtils.isEmpty(item.getDeviceCode())) return null;
boolean exists = cacheService.exists(RedisKey.KEY_DEVICE_ONLINE_CACHE + item.getDeviceCode());
if (!exists) {
item.setDeviceStatus(DeviceStatusEnum.离线.getValue());
item.setOfflineTime(new Date());
return item;
DeviceEntity condition = new DeviceEntity();
condition.setId(item.getId());
condition.setDeviceStatus(DeviceStatusEnum.离线.getValue());
condition.setOfflineTime(new Date());
return condition;
}
return null;
}).filter(f -> f != null).collect(Collectors.toList());
......
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