🐛 草稿预览不显示正文内容问题修复

This commit is contained in:
x ronger 2020-04-23 18:37:01 +08:00
parent d747b6f9bc
commit 23bf6780df

View File

@ -285,9 +285,9 @@ public class ArticleServiceImpl extends AbstractService<Article> implements Arti
List<ArticleTagDTO> tags = articleMapper.selectTags(article.getIdArticle()); List<ArticleTagDTO> tags = articleMapper.selectTags(article.getIdArticle());
article.setTags(tags); article.setTags(tags);
ArticleContent articleContent = articleMapper.selectArticleContent(article.getIdArticle()); ArticleContent articleContent = articleMapper.selectArticleContent(article.getIdArticle());
if (type == 1){ if (type.equals(1) || type.equals(0)){
article.setArticleContent(articleContent.getArticleContentHtml()); article.setArticleContent(articleContent.getArticleContentHtml());
} else if (type == 2) { } else if (type.equals(2)) {
article.setArticleContent(articleContent.getArticleContent()); article.setArticleContent(articleContent.getArticleContent());
} }