Commit 0a853152 by YG8999

修改设备状态变更查询操作日志时间范围为5分钟内

parent 7b76485f
...@@ -557,7 +557,7 @@ public class MqttxServiceImpl implements MqttxService { ...@@ -557,7 +557,7 @@ public class MqttxServiceImpl implements MqttxService {
Map<String, Device> map = deviceList.stream() Map<String, Device> map = deviceList.stream()
.collect(Collectors.toMap(Device::getDevId, Function.identity())); .collect(Collectors.toMap(Device::getDevId, Function.identity()));
// 设备操作日志(最近3分钟内的最新操作日志) // 设备操作日志(最近3分钟内的最新操作日志)
Date startDate = DateUtil.offsetMinute(DateUtil.date(), -3); Date startDate = DateUtil.offsetMinute(DateUtil.date(), -5);
List<DeviceLog> deviceLogList = deviceLogMapper.selectListByMaxId(devIds, startDate); List<DeviceLog> deviceLogList = deviceLogMapper.selectListByMaxId(devIds, startDate);
// 将List转换为Map // 将List转换为Map
Map<String, DeviceLog> deviceLogMap = deviceLogList.stream() Map<String, DeviceLog> deviceLogMap = deviceLogList.stream()
......
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