Commit 9f845e72 authored by 赵啸非's avatar 赵啸非

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

parent bb2ad6e2
......@@ -80,6 +80,8 @@ public class DirectDynamicListener implements MessageListener {
if (!ObjectUtils.isEmpty(deviceEntity)) {
cacheService.set(RedisKey.KEY_DEVICE_ONLINE_CACHE + deviceEntity.getDeviceCode(), "", GlobalSysInfo.getParamIntValue(Constant.HEARTBEAT_TIMEOUT, 180));
if (deviceEntity.getDeviceStatus() == DeviceStatusEnum.离线.getValue()) {
DeviceEntity condition = new DeviceEntity();
condition.setId(deviceEntity.getId());
deviceEntity.setOnlineTime(new Date());
deviceEntity.setDeviceStatus(DeviceStatusEnum.在线.getValue());
// DeviceEntity entity = new DeviceEntity();
......@@ -91,7 +93,7 @@ public class DirectDynamicListener implements MessageListener {
// deviceService.update(deviceEntity);
//deviceService.putCache(deviceEntity.getId().toString(),deviceEntity);
cacheService.lpush(RedisKey.KEY_DEVICE_UPDATE_QUEUE,deviceEntity);
cacheService.lpush(RedisKey.KEY_DEVICE_UPDATE_QUEUE,condition);
PlatformEntity platformEntity = platformService.getCache(deviceEntity.getPlatformId().toString());
ProductEntity productEntity = productService.get(deviceEntity.getProductId());
......
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