Commit b1beee1d by 罗志长

fix: 设备解绑后同步问题

parent 7c78ffee
......@@ -908,9 +908,6 @@ public class PlatDeviceServiceImpl extends ServiceImpl<PlatDeviceMapper, PlatDev
}
//查询iot设备
List<DeviceInstanceEntity> iotDeviceList = iotOrgService.getOrgDevice(iotOrgId);
if (CollectionUtils.isEmpty(iotDeviceList)) {
continue;
}
//查询平台设备
Set<String> iotDeviceIdSet = iotDeviceList.stream().map(DeviceInstanceEntity::getId).collect(Collectors.toSet());
......@@ -920,10 +917,9 @@ public class PlatDeviceServiceImpl extends ServiceImpl<PlatDeviceMapper, PlatDev
Set<String> newIotDeviceIdSet = Sets.newHashSet(iotDeviceIdSet);
Set<String> newPlatformDeviceIdSet = Sets.newHashSet(platformDeviceIdList);
if (CollectionUtils.isEmpty(newIotDeviceIdSet)) {
continue;
}
if (CollectionUtils.isNotEmpty(newIotDeviceIdSet)) {
newPlatformDeviceIdSet.removeAll(newIotDeviceIdSet);
}
if (CollectionUtils.isNotEmpty(newPlatformDeviceIdSet)) {
log.info("删除不存在iot的设备:{}",platTenant.getId());
......
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 sign in to comment