From ff14c4edc7aa41db4b8fd8722486027b8ff84af0 Mon Sep 17 00:00:00 2001 From: inleft <inleft@qq.com> Date: Fri, 12 Aug 2022 14:11:39 +0800 Subject: [PATCH] 友链弹窗添加 --- snowy-main/src/main/java/vip/xiaonuo/modular/blogarticle/mapper/mapping/BlogArticleMapper.xml | 34 +++++++++++++++++++++++++--------- 1 files changed, 25 insertions(+), 9 deletions(-) diff --git a/snowy-main/src/main/java/vip/xiaonuo/modular/blogarticle/mapper/mapping/BlogArticleMapper.xml b/snowy-main/src/main/java/vip/xiaonuo/modular/blogarticle/mapper/mapping/BlogArticleMapper.xml index 1615954..7448b28 100644 --- a/snowy-main/src/main/java/vip/xiaonuo/modular/blogarticle/mapper/mapping/BlogArticleMapper.xml +++ b/snowy-main/src/main/java/vip/xiaonuo/modular/blogarticle/mapper/mapping/BlogArticleMapper.xml @@ -23,6 +23,9 @@ a.publish_date, a.is_top, a.editor_status, + a.is_allowed_comment, + a.jump_url as jumpURL, + a.update_date, a.create_date </sql> @@ -30,17 +33,32 @@ <trim prefix="WHERE" prefixOverrides="AND | OR"> a.is_enable=1 and a.editor_status=1 - <if test="param.typeId != null"> - AND a.article_type_id = #{param.typeId} - </if> + <choose> + <when test="param.fileType != null"> + and a.article_file_type = #{param.fileType} + </when> + <when test="param.fileType == null and param.typeId == null"> + and a.article_file_type not in (3,4) + </when> + </choose> + <choose> + <when test="param.typeId != null"> + AND a.article_type_id = #{param.typeId} + order by a.is_top desc,a.top_value asc , a.create_date desc + </when> + <otherwise> + AND a.article_type_id != 4 + order by a.is_top desc,a.top_value asc , a.update_date desc + </otherwise> + </choose> </trim> + </sql> - <select id="searchList" resultType="vip.xiaonuo.modular.blogarticle.param.BlogArticleVo"> + <select id="searchList" resultType="vip.xiaonuo.modular.blogarticle.entity.BlogArticleVo"> select <include refid="Base_Column_List"/> - ,CONCAT("/",f1.file_bucket,"/",f1.file_object_name) as articleFileURL - ,IFNULL("",CONCAT("/",f2.file_bucket,"/",f2.file_object_name)) as coverFileURL + ,IF(a.cover_file_id is not null,CONCAT("/",f2.file_bucket,"/",f2.file_object_name),"") as coverFileURL ,t.type_name as articleTypeName from blog_article a @@ -55,8 +73,6 @@ on f2.id=a.cover_file_id <include refid="queryListCondition"/> - - order by a.top_value asc , a.create_date desc limit #{param.pageNo},#{param.pageSize} </select> @@ -73,7 +89,7 @@ <select id="searchMonthCount" resultType="vip.xiaonuo.modular.blogStatistics.vo.BlogArchiveDetailVo"> SELECT separate_month AS `month`, - count(1) AS count + count(1) AS `count` FROM blog_article WHERE -- Gitblit v1.9.1