Browse Source

物实体查询bug

2025年1月1日13:31:17
thing_master
lishuai 1 year ago
parent
commit
7997478bf2
  1. 2
      modules/thing/src/main/java/com/thing/thing/entity/service/impl/IotThingEntityServiceImpl.java

2
modules/thing/src/main/java/com/thing/thing/entity/service/impl/IotThingEntityServiceImpl.java

@ -375,7 +375,7 @@ public class IotThingEntityServiceImpl extends BaseServiceImpl<IotThingEntityMap
public Optional<List<IotThingEntityDTO>> findByCodes(Collection<String> codes,Long tenantCode,boolean isEntity) { public Optional<List<IotThingEntityDTO>> findByCodes(Collection<String> codes,Long tenantCode,boolean isEntity) {
return Optional.ofNullable(mapper.selectListByQueryAs(QueryWrapper.create() return Optional.ofNullable(mapper.selectListByQueryAs(QueryWrapper.create()
.in(IotThingEntity::getCode, codes,CollectionUtils.isNotEmpty(codes)) .in(IotThingEntity::getCode, codes,CollectionUtils.isNotEmpty(codes))
.in(IotThingEntity::getTenantCode, tenantCode,!Objects.isNull(tenantCode))
.eq(IotThingEntity::getTenantCode, tenantCode,!Objects.isNull(tenantCode))
.eq(IotThingEntity::getTemplateMark,isEntity? "0":"1") .eq(IotThingEntity::getTemplateMark,isEntity? "0":"1")
,IotThingEntityDTO.class)); ,IotThingEntityDTO.class));
} }

Loading…
Cancel
Save