Commit e841eac1 by 罗志长

Revert: 设备解绑后同步问题

parent a2343a39
......@@ -956,6 +956,9 @@ 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());
......@@ -965,9 +968,10 @@ public class PlatDeviceServiceImpl extends ServiceImpl<PlatDeviceMapper, PlatDev
Set<String> newIotDeviceIdSet = Sets.newHashSet(iotDeviceIdSet);
Set<String> newPlatformDeviceIdSet = Sets.newHashSet(platformDeviceIdList);
if (CollectionUtils.isNotEmpty(newIotDeviceIdSet)) {
newPlatformDeviceIdSet.removeAll(newIotDeviceIdSet);
if (CollectionUtils.isEmpty(newIotDeviceIdSet)) {
continue;
}
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