|
|
@ -321,6 +321,7 @@ public class ArticleServiceImpl extends BaseServiceImpl<ArticleDao, ArticleEntit |
|
|
|
|
|
|
|
@Override |
|
|
|
public Boolean previewSaveDraftAttr(TokenDto tokenDto, DraftAttrFromDTO fromDTO) { |
|
|
|
log.debug("previewSaveDraftAttr param:{}",JSON.toJSONString(fromDTO)); |
|
|
|
//校验参数
|
|
|
|
ValidatorUtils.validateEntity(fromDTO); |
|
|
|
if (DraftConstant.TOP.equals(fromDTO.getIsTop()) && StringUtils.isBlank(fromDTO.getCoverImg())) { |
|
|
@ -334,8 +335,8 @@ public class ArticleServiceImpl extends BaseServiceImpl<ArticleDao, ArticleEntit |
|
|
|
throw new RenException(ModuleConstant.DRAFT_IS_TOP_ERROR); |
|
|
|
} |
|
|
|
|
|
|
|
if (!DraftConstant.AGENCY.equals(fromDTO.getPublisherType()) || !DraftConstant.DEPARTMENT.equals(fromDTO.getPublisherType()) |
|
|
|
|| !DraftConstant.GRID.equals(fromDTO.getPublisherType())) { |
|
|
|
if (!DraftConstant.AGENCY.equals(fromDTO.getPublisherType()) && !DraftConstant.DEPARTMENT.equals(fromDTO.getPublisherType()) |
|
|
|
&& !DraftConstant.GRID.equals(fromDTO.getPublisherType())) { |
|
|
|
throw new RenException(ModuleConstant.DRAFT_PUBLISHER_TYPE_ERROR); |
|
|
|
} |
|
|
|
return saveDraftAttr(tokenDto, fromDTO); |
|
|
|