Commit 61d997a9 by 谢海旭

Merge branch 'develop'

2 parents 304c9acc fad5cb1b
......@@ -153,6 +153,8 @@ public class DeviceServiceImpl implements DeviceService {
}
List<DeviceLocation> locationList = deviceLocationMapper.selectBySns(snsMap.keySet());
List<Device> devices = deviceMapper.selectBySns(snsMap.keySet());
Map<String, Device> snDeviceMap = devices.stream().collect(Collectors.toMap(Device::getSn, device -> device));
Map<String, DeviceLocation> loginDtoMap = locationList.stream().collect(Collectors.toMap(DeviceLocation::getSn, location -> location));
......@@ -161,6 +163,12 @@ public class DeviceServiceImpl implements DeviceService {
if (deviceLogin == null) {
return;
}
Date stayStatusUpdatetime = deviceLogin.getStayStatusUpdatetime();
if (Objects.isNull(stayStatusUpdatetime)) {
deviceLogin.setStayStatusUpdatetime(snDeviceMap.get(sn).getActivateTime());
}
statusModels.add(DeviceUtils.parseDeviceStatus(deviceLogin, deviceType, offlineTime));
});
return statusModels;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!