Showing
1 changed file
with
1 additions
and
1 deletions
@@ -46,7 +46,7 @@ public class TkVideoPlatformServiceImpl extends AbstractBaseService<TkVideoPlatf | @@ -46,7 +46,7 @@ public class TkVideoPlatformServiceImpl extends AbstractBaseService<TkVideoPlatf | ||
46 | TkVideoPlatformEntity entity = baseMapper.selectOne(new LambdaQueryWrapper<TkVideoPlatformEntity>() | 46 | TkVideoPlatformEntity entity = baseMapper.selectOne(new LambdaQueryWrapper<TkVideoPlatformEntity>() |
47 | .eq(TkVideoPlatformEntity::getHost, videoPlatformDTO.getHost()) | 47 | .eq(TkVideoPlatformEntity::getHost, videoPlatformDTO.getHost()) |
48 | .eq(TkVideoPlatformEntity::getTenantId,videoPlatformDTO.getTenantId())); | 48 | .eq(TkVideoPlatformEntity::getTenantId,videoPlatformDTO.getTenantId())); |
49 | - if (null != entity) { | 49 | + if (null != entity && (StringUtils.isEmpty(videoPlatformDTO.getId()) || !entity.getId().equals(videoPlatformDTO.getId()))) { |
50 | throw new TkDataValidationException(ErrorMessage.VIDEO_PLATFORM_HOST_EXISTED.getMessage()); | 50 | throw new TkDataValidationException(ErrorMessage.VIDEO_PLATFORM_HOST_EXISTED.getMessage()); |
51 | } | 51 | } |
52 | if (StringUtils.isNotEmpty(videoPlatformDTO.getId())) { | 52 | if (StringUtils.isNotEmpty(videoPlatformDTO.getId())) { |