From fe8f3e622207c3e848a9140783bb17dd3fbc3616 Mon Sep 17 00:00:00 2001
From: linwei <872216696@qq.com>
Date: Fri, 19 Jan 2024 16:47:17 +0800
Subject: [PATCH] 街道身份,只查找该街道下面的公告

---
 src/main/java/org/springblade/modules/article/mapper/ArticleMapper.xml |   13 ++++++++-----
 1 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/src/main/java/org/springblade/modules/article/mapper/ArticleMapper.xml b/src/main/java/org/springblade/modules/article/mapper/ArticleMapper.xml
index ed301e5..f16510b 100644
--- a/src/main/java/org/springblade/modules/article/mapper/ArticleMapper.xml
+++ b/src/main/java/org/springblade/modules/article/mapper/ArticleMapper.xml
@@ -183,6 +183,7 @@
     <select id="selectArticlePage" resultType="org.springblade.modules.article.entity.Article">
         select * from jczz_article
         where 1=1
+        and is_deleted = 0
         <if test="article.title!=null and article.title!=''">
             and title like concat('%',#{article.title},'%')
         </if>
@@ -201,16 +202,18 @@
         <if test="article.articleType!=null and article.articleType!=''">
             and article_type like concat('%',#{article.articleType},'%')
         </if>
+        <if test="article.type != null ">and type = #{article.type}</if>
+
         <if test="article.keyword!=null and article.keyword!=''">
             AND CONCAT(title,source_name)
             LIKE CONCAT ('%', #{article.keyword},'%')
         </if>
-        <if test="article.districtId != null and article.districtId != ''">
-            and article_range like concat('%',#{article.districtId},'%')
+        <if test="article.districtIdList != null and article.districtIdList != ''">
+            and (article_range like
+            <foreach collection="article.districtIdList" separator=" or article_range like" item="id">'%${id}%'
+            </foreach>
+            )
         </if>
-        <if test="article.type != null ">and type = #{article.type}</if>
-
-        and is_deleted = 0
         order by id desc
     </select>
 

--
Gitblit v1.9.3