Showing
1 changed file
with
2 additions
and
2 deletions
@@ -789,7 +789,7 @@ public class TkDeviceServiceImpl extends AbstractBaseService<DeviceMapper, TkDev | @@ -789,7 +789,7 @@ public class TkDeviceServiceImpl extends AbstractBaseService<DeviceMapper, TkDev | ||
789 | new LambdaQueryWrapper<TkDeviceEntity>() | 789 | new LambdaQueryWrapper<TkDeviceEntity>() |
790 | .eq(TkDeviceEntity::getTenantId, tenantId) | 790 | .eq(TkDeviceEntity::getTenantId, tenantId) |
791 | .eq(TkDeviceEntity::getDeviceProfileId, deviceProfileId) | 791 | .eq(TkDeviceEntity::getDeviceProfileId, deviceProfileId) |
792 | - .in(!orgIds.isEmpty(),TkDeviceEntity::getOrganizationId, orgIds)); | 792 | + .in(null!=orgIds && !orgIds.isEmpty(),TkDeviceEntity::getOrganizationId, orgIds)); |
793 | return Optional.ofNullable(entityList) | 793 | return Optional.ofNullable(entityList) |
794 | .map( | 794 | .map( |
795 | list -> | 795 | list -> |
@@ -814,7 +814,7 @@ public class TkDeviceServiceImpl extends AbstractBaseService<DeviceMapper, TkDev | @@ -814,7 +814,7 @@ public class TkDeviceServiceImpl extends AbstractBaseService<DeviceMapper, TkDev | ||
814 | new LambdaQueryWrapper<TkDeviceEntity>() | 814 | new LambdaQueryWrapper<TkDeviceEntity>() |
815 | .eq(TkDeviceEntity::getTenantId, tenantId) | 815 | .eq(TkDeviceEntity::getTenantId, tenantId) |
816 | .eq(TkDeviceEntity::getDeviceProfileId, deviceProfileId) | 816 | .eq(TkDeviceEntity::getDeviceProfileId, deviceProfileId) |
817 | - .in(!orgIds.isEmpty(),TkDeviceEntity::getOrganizationId, orgIds) | 817 | + .in(null !=orgIds &&!orgIds.isEmpty(),TkDeviceEntity::getOrganizationId, orgIds) |
818 | .select(TkDeviceEntity::getTbDeviceId))) | 818 | .select(TkDeviceEntity::getTbDeviceId))) |
819 | .map(list -> list.stream().map(TkDeviceEntity::getTbDeviceId).collect(Collectors.toList())) | 819 | .map(list -> list.stream().map(TkDeviceEntity::getTbDeviceId).collect(Collectors.toList())) |
820 | .orElse(null); | 820 | .orElse(null); |