Commit a24a2dfcc562b5b830d17d5c81ed5a2ea5cdf875

Authored by 云中非
1 parent 579c7bf6

fix: 设备没有设备配置ID

... ... @@ -522,7 +522,7 @@ public class TkSceneLinkageServiceImpl extends AbstractBaseService<SceneLinkageM
522 522 List<String> allDevices = new ArrayList<>();
523 523 if(organizationDevices != null && !organizationDevices.isEmpty()){
524 524 for (DeviceDTO item : organizationDevices) {
525   - if(!item.getDeviceProfileId().equals(profileId)){
  525 + if(StringUtils.isBlank(item.getDeviceProfileId()) || !item.getDeviceProfileId().equals(profileId)){
526 526 continue;
527 527 }
528 528 DeviceTypeEnum deviceType = item.getDeviceType();
... ... @@ -571,7 +571,8 @@ public class TkSceneLinkageServiceImpl extends AbstractBaseService<SceneLinkageM
571 571 List<TkDoActionEntity> actions =
572 572 doActionMapper.selectList(
573 573 new LambdaQueryWrapper<TkDoActionEntity>()
574   - .eq(TkDoActionEntity::getSceneLinkageId, sceneId));
  574 + .eq(TkDoActionEntity::getSceneLinkageId, sceneId)
  575 + .eq(TkDoActionEntity::getEntityType, ScopeEnum.ALL));
575 576 actions.forEach(
576 577 item -> {
577 578 if (sceneId.equals(item.getSceneLinkageId())) {
... ...