Commit b7380cd8479d76e96769ef890ff02ca883d22077

Authored by xp.Huang
1 parent 628c028c

fix: 增加组织id查询的null判断

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