🐛 展示文章预览内容
This commit is contained in:
parent
90c9d31527
commit
44defa3aa9
@ -176,7 +176,8 @@ public class ArticleServiceImpl extends AbstractService<Article> implements Arti
|
|||||||
} else if(type == 2){
|
} else if(type == 2){
|
||||||
ArticleContent articleContent = articleMapper.selectArticleContent(article.getIdArticle());
|
ArticleContent articleContent = articleMapper.selectArticleContent(article.getIdArticle());
|
||||||
article.setArticleContent(articleContent.getArticleContent());
|
article.setArticleContent(articleContent.getArticleContent());
|
||||||
} else {
|
}
|
||||||
|
|
||||||
if(StringUtils.isBlank(article.getArticlePreviewContent())){
|
if(StringUtils.isBlank(article.getArticlePreviewContent())){
|
||||||
ArticleContent articleContent = articleMapper.selectArticleContent(article.getIdArticle());
|
ArticleContent articleContent = articleMapper.selectArticleContent(article.getIdArticle());
|
||||||
Integer length = articleContent.getArticleContentHtml().length();
|
Integer length = articleContent.getArticleContentHtml().length();
|
||||||
@ -186,7 +187,6 @@ public class ArticleServiceImpl extends AbstractService<Article> implements Arti
|
|||||||
String articlePreviewContent = articleContent.getArticleContentHtml().substring(0,length);
|
String articlePreviewContent = articleContent.getArticleContentHtml().substring(0,length);
|
||||||
article.setArticlePreviewContent(Html2TextUtil.getContent(articlePreviewContent));
|
article.setArticlePreviewContent(Html2TextUtil.getContent(articlePreviewContent));
|
||||||
}
|
}
|
||||||
}
|
|
||||||
return article;
|
return article;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user