附加文章内容

This commit is contained in:
gxwebsoft
2024-03-13 20:55:29 +08:00
parent 1f005aa1b0
commit ddbd96eb8a
@@ -58,8 +58,10 @@ public class ArticleController extends BaseController {
article.setActualViews(article.getActualViews() + 1);
articleService.updateById(article);
// 附加文字内容
final ArticleContent content = articleContentService.getById(article.getArticleId());
article.setContent(content.getContent());
if(article != null){
ArticleContent content = articleContentService.getOne(new LambdaQueryWrapper<ArticleContent>().eq(ArticleContent::getArticleId,article.getArticleId()));
article.setContent(content.getContent());
}
return success(article);
}