Showing
1 changed file
with
2 additions
and
2 deletions
... | ... | @@ -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( | ... | ... |