|
@ -1518,7 +1518,6 @@ public class ArticleServiceImpl extends BaseServiceImpl<ArticleDao, ArticleEntit |
|
|
if (formDTO.getPublisherType().equals(DraftConstant.GRID)){ |
|
|
if (formDTO.getPublisherType().equals(DraftConstant.GRID)){ |
|
|
article.setGridId(formDTO.getPublisher()); |
|
|
article.setGridId(formDTO.getPublisher()); |
|
|
} |
|
|
} |
|
|
article.setTitleAuditStatus(ArticleConstant.AUDIT_WAY_NO_AUDIT); |
|
|
|
|
|
article.setPreviewContent(getPreviewContent(formDTO.getContent()).length() > DraftConstant.PREVIEW_CONTENT_MAX_LENGTH ? getPreviewContent(formDTO.getContent()).substring(NumConstant.ZERO,DraftConstant.PREVIEW_CONTENT_MAX_LENGTH) : getPreviewContent(formDTO.getContent())); |
|
|
article.setPreviewContent(getPreviewContent(formDTO.getContent()).length() > DraftConstant.PREVIEW_CONTENT_MAX_LENGTH ? getPreviewContent(formDTO.getContent()).substring(NumConstant.ZERO,DraftConstant.PREVIEW_CONTENT_MAX_LENGTH) : getPreviewContent(formDTO.getContent())); |
|
|
article.setPublishDate(DateUtils.stringToDate(formDTO.getPublishDate(),DateUtils.DATE_PATTERN)); |
|
|
article.setPublishDate(DateUtils.stringToDate(formDTO.getPublishDate(),DateUtils.DATE_PATTERN)); |
|
|
article.setPublisherId(formDTO.getPublisher()); |
|
|
article.setPublisherId(formDTO.getPublisher()); |
|
@ -1534,7 +1533,6 @@ public class ArticleServiceImpl extends BaseServiceImpl<ArticleDao, ArticleEntit |
|
|
articleContent.setArticleId(article.getId()); |
|
|
articleContent.setArticleId(article.getId()); |
|
|
articleContent.setContent(formDTO.getContent()); |
|
|
articleContent.setContent(formDTO.getContent()); |
|
|
articleContent.setContentType("rich_text"); |
|
|
articleContent.setContentType("rich_text"); |
|
|
articleContent.setAuditStatus(ArticleConstant.AUDIT_WAY_NO_AUDIT); |
|
|
|
|
|
articleContent.setOrderNum(NumConstant.ZERO); |
|
|
articleContent.setOrderNum(NumConstant.ZERO); |
|
|
articleContentDao.insert(articleContent); |
|
|
articleContentDao.insert(articleContent); |
|
|
// 3.操作记录
|
|
|
// 3.操作记录
|
|
@ -1592,7 +1590,6 @@ public class ArticleServiceImpl extends BaseServiceImpl<ArticleDao, ArticleEntit |
|
|
// 1.草稿
|
|
|
// 1.草稿
|
|
|
DraftEntity draft = ConvertUtils.sourceToTarget(formDTO, DraftEntity.class); |
|
|
DraftEntity draft = ConvertUtils.sourceToTarget(formDTO, DraftEntity.class); |
|
|
draft.setDepartmentId(customerId); |
|
|
draft.setDepartmentId(customerId); |
|
|
draft.setTitleAuditStatus(ArticleConstant.AUDIT_WAY_NO_AUDIT); |
|
|
|
|
|
draft.setPreviewContent(getPreviewContent(formDTO.getContent()).length() > DraftConstant.PREVIEW_CONTENT_MAX_LENGTH ? getPreviewContent(formDTO.getContent()).substring(NumConstant.ZERO,DraftConstant.PREVIEW_CONTENT_MAX_LENGTH) : getPreviewContent(formDTO.getContent())); |
|
|
draft.setPreviewContent(getPreviewContent(formDTO.getContent()).length() > DraftConstant.PREVIEW_CONTENT_MAX_LENGTH ? getPreviewContent(formDTO.getContent()).substring(NumConstant.ZERO,DraftConstant.PREVIEW_CONTENT_MAX_LENGTH) : getPreviewContent(formDTO.getContent())); |
|
|
draft.setPublishRangeDesc(CollectionUtils.isEmpty(formDTO.getPublishRangeDesc()) ? "" : formDTO.getPublishRangeDesc().stream().collect(Collectors.joining("、"))); |
|
|
draft.setPublishRangeDesc(CollectionUtils.isEmpty(formDTO.getPublishRangeDesc()) ? "" : formDTO.getPublishRangeDesc().stream().collect(Collectors.joining("、"))); |
|
|
draft.setPublisherId(formDTO.getPublisher()); |
|
|
draft.setPublisherId(formDTO.getPublisher()); |
|
@ -1612,7 +1609,6 @@ public class ArticleServiceImpl extends BaseServiceImpl<ArticleDao, ArticleEntit |
|
|
draftContent.setDraftId(draft.getId()); |
|
|
draftContent.setDraftId(draft.getId()); |
|
|
draftContent.setContent(formDTO.getContent()); |
|
|
draftContent.setContent(formDTO.getContent()); |
|
|
draftContent.setContentType("rich_text"); |
|
|
draftContent.setContentType("rich_text"); |
|
|
draftContent.setAuditStatus(ArticleConstant.AUDIT_WAY_NO_AUDIT); |
|
|
|
|
|
draftContent.setOrderNum(NumConstant.ZERO); |
|
|
draftContent.setOrderNum(NumConstant.ZERO); |
|
|
draftContentDao.insert(draftContent); |
|
|
draftContentDao.insert(draftContent); |
|
|
// 3.发布范围
|
|
|
// 3.发布范围
|
|
|