|
|
@ -187,6 +187,7 @@ public class ArticleServiceImpl extends BaseServiceImpl<ArticleDao, ArticleEntit |
|
|
|
List<DraftContentEntity> draftContentList = null; |
|
|
|
if (StringUtils.isNotBlank(fromDTO.getDraftId())) { |
|
|
|
draftEntity = this.checkDraftStatus(fromDTO.getDraftId()); |
|
|
|
draftEntity.setCategory(fromDTO.getCategory()); |
|
|
|
draftEntity.setTitle(StringUtils.isBlank(fromDTO.getTitle()) ? "" : fromDTO.getTitle()); |
|
|
|
buildPreviewContent(fromDTO, draftEntity); |
|
|
|
draftDao.updateById(draftEntity); |
|
|
@ -212,6 +213,7 @@ public class ArticleServiceImpl extends BaseServiceImpl<ArticleDao, ArticleEntit |
|
|
|
draftEntity.setGridId(""); |
|
|
|
draftEntity.setDepartmentId(loginUserDetails.getData().getCustomerId()); |
|
|
|
draftEntity.setDelFlag(NumConstant.ZERO_STR); |
|
|
|
draftEntity.setCategory(fromDTO.getCategory()); |
|
|
|
buildPreviewContent(fromDTO, draftEntity); |
|
|
|
draftDao.insert(draftEntity); |
|
|
|
} |
|
|
@ -306,8 +308,8 @@ public class ArticleServiceImpl extends BaseServiceImpl<ArticleDao, ArticleEntit |
|
|
|
DraftCoverEntity coverEntity = buildCoverEntity(tokenDto, fromDTO); |
|
|
|
//发布范围
|
|
|
|
List<DraftPublishRangeEntity> publishRangeEntityList = buildDraftPublishRange(draftEntity, tokenDto, fromDTO); |
|
|
|
|
|
|
|
|
|
|
|
// 栏目
|
|
|
|
draftEntity.setCategory(fromDTO.getCategory()); |
|
|
|
executeSaveDraftAttr(draftEntity, coverEntity, publishRangeEntityList); |
|
|
|
return true; |
|
|
|
} |
|
|
@ -933,6 +935,7 @@ public class ArticleServiceImpl extends BaseServiceImpl<ArticleDao, ArticleEntit |
|
|
|
article.setId(null); |
|
|
|
article.setDraftId(draftId); |
|
|
|
article.setStatusFlag(DraftConstant.PUBLISHED); |
|
|
|
article.setCategory(draft.getCategory()); |
|
|
|
if (StringUtils.isNotBlank(publishWay)) { |
|
|
|
article.setPublishWay(publishWay); |
|
|
|
} |
|
|
|