Commit 5eceb1a3 authored by 赵啸非's avatar 赵啸非

修改离线消息

parent c577bbe0
......@@ -82,8 +82,8 @@ public class DirectDynamicListener implements MessageListener {
if (deviceEntity.getDeviceStatus() == DeviceStatusEnum.离线.getValue()) {
DeviceEntity condition = new DeviceEntity();
condition.setId(deviceEntity.getId());
deviceEntity.setOnlineTime(new Date());
deviceEntity.setDeviceStatus(DeviceStatusEnum.在线.getValue());
condition.setOnlineTime(new Date());
condition.setDeviceStatus(DeviceStatusEnum.在线.getValue());
// DeviceEntity entity = new DeviceEntity();
// entity.setOnlineTime(new Date());
// entity.setDeviceStatus(DeviceStatusEnum.在线.getValue());
......
......@@ -78,6 +78,11 @@ public class DeviceUpdateComsumerThread extends AbstractThread {
List<List<DeviceEntity>> partition = ListUtil.partition(sortUpdateList, 50);
for (List<DeviceEntity> deviceEntityList : partition) {
deviceService.update(deviceEntityList);
try {
Thread.sleep(1000);
} catch (InterruptedException e) {
throw new RuntimeException(e);
}
}
});
/*
......
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