修改获取设备列表的方式

This commit is contained in:
iteaj
2024-09-15 21:29:46 +08:00
parent c0d3fc2a74
commit 7cab3e2acb
@@ -243,9 +243,9 @@ public class DeviceServiceImpl extends BaseServiceImpl<DeviceMapper, Device> imp
children.values().forEach(iotCacheManager::removeDevice);
// 缓存新的子设备
Map<String, RealtimeStatus> childMap = this.listChildDeviceStatusFromCache(newCache.getProtocolCode(), newCache.getDeviceSn());
if(childMap != null) {
childMap.values().forEach(iotCacheManager::cache);
List<RealtimeStatus> childDevices = this.getBaseMapper().listDeviceStatus(newCache.getProtocolCode(), null, newCache.getDeviceSn());
if(childDevices != null) {
childDevices.forEach(iotCacheManager::cache);
}
}
}