|
|
@ -1538,6 +1538,7 @@ public class ArticleServiceImpl extends BaseServiceImpl<ArticleDao, ArticleEntit |
|
|
|
if (formDTO.getPublisherType().equals(DraftConstant.GRID)){ |
|
|
|
article.setGridId(formDTO.getPublisher()); |
|
|
|
} |
|
|
|
article.setCategory(formDTO.getCategory()); |
|
|
|
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()); |
|
|
@ -1617,6 +1618,7 @@ public class ArticleServiceImpl extends BaseServiceImpl<ArticleDao, ArticleEntit |
|
|
|
// 1.草稿
|
|
|
|
DraftEntity draft = ConvertUtils.sourceToTarget(formDTO, DraftEntity.class); |
|
|
|
draft.setDepartmentId(customerId); |
|
|
|
draft.setCategory(formDTO.getCategory()); |
|
|
|
draft.setPreviewContent(StringUtils.isBlank(formDTO.getContent()) ? "" : getPreviewContent(formDTO.getContent()).length() > DraftConstant.PREVIEW_CONTENT_MAX_LENGTH ? getPreviewContent(formDTO.getContent()).substring(NumConstant.ZERO,DraftConstant.PREVIEW_CONTENT_MAX_LENGTH) : getPreviewContent(formDTO.getContent())); |
|
|
|
draft.setPublisherId(StringUtils.isBlank(formDTO.getPublisher()) ? "" : formDTO.getPublisher()); |
|
|
|
draft.setPublishDate(StringUtils.isBlank(formDTO.getPublishDate()) ? null : DateUtils.stringToDate(formDTO.getPublishDate(),DateUtils.DATE_PATTERN)); |
|
|
@ -1841,6 +1843,7 @@ public class ArticleServiceImpl extends BaseServiceImpl<ArticleDao, ArticleEntit |
|
|
|
if (formDTO.getPublisherType().equals(DraftConstant.GRID)){ |
|
|
|
articleEntity.setGridId(formDTO.getPublisher()); |
|
|
|
} |
|
|
|
articleEntity.setCategory(formDTO.getCategory()); |
|
|
|
articleEntity.setPreviewContent(getPreviewContent(formDTO.getContent()).length() > DraftConstant.PREVIEW_CONTENT_MAX_LENGTH ? getPreviewContent(formDTO.getContent()).substring(NumConstant.ZERO,DraftConstant.PREVIEW_CONTENT_MAX_LENGTH) : getPreviewContent(formDTO.getContent())); |
|
|
|
articleEntity.setPublishDate(DateUtils.stringToDate(formDTO.getPublishDate(),DateUtils.DATE_PATTERN)); |
|
|
|
articleEntity.setPublisherId(formDTO.getPublisher()); |
|
|
|