新建动态标题重复异常抛出错误
This commit is contained in:
@@ -41,7 +41,7 @@ public class ContentServiceImpl implements ContentService {
|
||||
//增加不允许重复标题的逻辑
|
||||
Boolean isDuplicated = contentInfoMapper.whetherTitleDuplicated(dto.getContentTitle());
|
||||
if (isDuplicated) {
|
||||
throw new ApiException(ErrorCodeEnum.DATA_CONVERT_ERROR);
|
||||
throw new ApiException(ErrorCodeEnum.CONTENT_DUPLICATED);
|
||||
}
|
||||
HyContentInfoDO hyContentInfoDO = new HyContentInfoDO();
|
||||
BeanUtil.copyProperties(dto, hyContentInfoDO);
|
||||
|
||||
Reference in New Issue
Block a user