From eacb2e29f32c9a694aa7b32744bad8239e730915 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A6=BE=E5=87=A0=E6=B5=B7?= Date: Mon, 15 Mar 2021 18:51:53 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E5=BC=82=E5=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/resources/mapper/articleMapper.xml | 41 +++++++++++++++++---- 1 file changed, 34 insertions(+), 7 deletions(-) diff --git a/src/main/resources/mapper/articleMapper.xml b/src/main/resources/mapper/articleMapper.xml index 2a3ee0d..c08286a 100644 --- a/src/main/resources/mapper/articleMapper.xml +++ b/src/main/resources/mapper/articleMapper.xml @@ -51,7 +51,8 @@ - + @@ -120,12 +121,38 @@ order by articleId desc - + select article.a_id as articleId, + article.a_title as title, + article.a_summary as summary, + article.a_md_content as mdContent, + article.a_url as url, + article.a_is_original as isOriginal, + article.a_reading_number as readingCount, + article.a_like as likeCount, + article.a_dislike as dislikeCount, + article.a_publish_date as publishDate, + article.a_update_date as updateDate, + article.a_is_open as isOpen, + category.t_id as categoryId, + category.t_name as categoryName, + user.u_id as authorId, + user.u_email as userEmail, + user.u_avatar as userAvatar, + user.u_display_name as userDisplayName, + article.is_delete as isDelete + from article, + tag_category as category, + article_tag, + user + where article.a_is_open = #{isOpen} + and article.is_delete = false + and article.a_id = article_tag.a_id + and article.a_category_id = category.t_id + and category.is_category = true + and article.a_author_id = user.u_id + group by article.a_id + order by article.a_id desc