From aae48957ba971ed0a1bfbfa182701cd22bbe8694 Mon Sep 17 00:00:00 2001 From: inleft <inleft@qq.com> Date: Wed, 31 Aug 2022 18:12:16 +0800 Subject: [PATCH] 新增编辑页 查询接口 --- snowy-main/src/main/java/vip/xiaonuo/modular/blogarticle/mapper/mapping/BlogArticleMapper.xml | 28 ++++++++++++++++------------ 1 files changed, 16 insertions(+), 12 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 c5b8025..ce497d4 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 @@ -38,24 +38,19 @@ and a.editor_status=1 and a.publish_date < now() <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.publish_date desc </when> - <!-- 指定排除 笔记类在首页显示 --> <otherwise> - AND a.article_type_id != 4 + <!-- 首页不出现视频等文件类型--> + <if test="param.faceExcludeFile != null"> + and a.article_file_type not in + <foreach collection="param.faceExcludeFile" item="obj" separator="," open="(" close=")"> + #{obj} + </foreach> + </if> order by a.is_top desc,a.top_value asc , a.update_date desc </otherwise> </choose> @@ -73,6 +68,11 @@ blog_article a inner join blog_article_type t on t.id =a.article_type_id + + <!-- 排除首页不查询的分类--> + <if test="param.typeId == null"> + and t.is_show_face = 1 + </if> left join sys_file_info f2 on f2.id=a.cover_file_id @@ -129,6 +129,10 @@ and a.editor_status=1 and a.publish_date < now() + <if test="param.id != null"> + and a.id = #{param.id} + </if> + <if test="param.fileType != null"> and a.article_file_type = #{param.fileType} </if> -- Gitblit v1.9.1