zxc 3 years ago
parent
commit
5458b690da
  1. 4
      epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/ArticleServiceImpl.java

4
epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/ArticleServiceImpl.java

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

Loading…
Cancel
Save