Commit 376a8b45b78874ce1b496ac7d2639537dd832e4d

Authored by 芯火源
1 parent 444b099e

feat: 任意租户都可以查看系统预置的默认脚本

... ... @@ -192,8 +192,8 @@ public class TkDeviceScriptServiceImpl
192 192 LambdaQueryWrapper<TkDeviceScriptEntity> queryWrapper =
193 193 new QueryWrapper<TkDeviceScriptEntity>()
194 194 .lambda()
195   - .eq(TkDeviceScriptEntity::getTenantId, tenantId)
196   - .eq(TkDeviceScriptEntity::getId, id);
  195 + .eq(TkDeviceScriptEntity::getId, id).and(a -> a
  196 + .eq(TkDeviceScriptEntity::getTenantId, tenantId).or(b->b.eq(TkDeviceScriptEntity::getTenantId,EntityId.NULL_UUID.toString())));
197 197 TkDeviceScriptEntity profile = baseMapper.selectOne(queryWrapper);
198 198 return Optional.ofNullable(profile)
199 199 .map(
... ...