Commit 07576fe07dd4474cc2036d315d194736eb3f8eb3
Merge branch '2024-1-30-bug' into 'master_dev'
fix:解决多租户下流媒体配置可能存在同一平台地址导致查询出错 See merge request yunteng/thingskit!321
Showing
1 changed file
with
3 additions
and
2 deletions
@@ -54,8 +54,9 @@ public class TkVideoPlatformServiceImpl extends AbstractBaseService<TkVideoPlatf | @@ -54,8 +54,9 @@ public class TkVideoPlatformServiceImpl extends AbstractBaseService<TkVideoPlatf | ||
54 | } | 54 | } |
55 | baseMapper.updateById(videoPlatformDTO.getEntity(TkVideoPlatformEntity.class)); | 55 | baseMapper.updateById(videoPlatformDTO.getEntity(TkVideoPlatformEntity.class)); |
56 | } else { | 56 | } else { |
57 | - TkVideoPlatformEntity entity = baseMapper.selectOne(new LambdaQueryWrapper<TkVideoPlatformEntity>(). | ||
58 | - eq(TkVideoPlatformEntity::getHost, videoPlatformDTO.getHost())); | 57 | + TkVideoPlatformEntity entity = baseMapper.selectOne(new LambdaQueryWrapper<TkVideoPlatformEntity>() |
58 | + .eq(TkVideoPlatformEntity::getHost, videoPlatformDTO.getHost()) | ||
59 | + .eq(TkVideoPlatformEntity::getTenantId,videoPlatformDTO.getTenantId())); | ||
59 | if (null != entity) { | 60 | if (null != entity) { |
60 | throw new TkDataValidationException(ErrorMessage.VIDEO_PLATFORM_HOST_EXISTED.getMessage()); | 61 | throw new TkDataValidationException(ErrorMessage.VIDEO_PLATFORM_HOST_EXISTED.getMessage()); |
61 | } | 62 | } |