From bdfb1bfaf5dc5d7318c632fcc6fdf3ffacbd075f Mon Sep 17 00:00:00 2001
From: lin <sbla5888@163.com>
Date: Mon, 15 Apr 2024 17:21:29 +0800
Subject: [PATCH] 社区管理员查询轮播图+报事报修查询优化

---
 src/main/java/org/springblade/modules/article/mapper/ArticleMapper.xml |   30 ++++++++++++++++++++++++++++--
 1 files changed, 28 insertions(+), 2 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 46c5cdc..3ea461f 100644
--- a/src/main/java/org/springblade/modules/article/mapper/ArticleMapper.xml
+++ b/src/main/java/org/springblade/modules/article/mapper/ArticleMapper.xml
@@ -114,6 +114,10 @@
                 or ja.article_range is null or ja.article_range = '')
             </if>
 
+            <if test="article.districtId == null ">
+                and ja.article_range is  null
+            </if>
+
             <if test="article.householdId != null">
                 and (FIND_IN_SET ( #{article.householdId}, jpd.user_ids )
                 OR jpd.user_ids IS NULL or jpd.user_ids = '')
@@ -548,7 +552,6 @@
         <if test="article.eventType != null">
             and jpd.event_type = #{article.eventType}
             and jpd.end_time is not null
-            and jpd.end_time &lt;= SYSDATE()
         </if>
 
         <if test="article.propertyFlag!=null ">
@@ -579,7 +582,9 @@
         <if test="article.articleType!=null and article.articleType!=''">
             and ja.article_type like concat('%',#{article.articleType},'%')
         </if>
-        <if test="article.type != null ">and ja.type = #{article.type}</if>
+        <if test="article.type != null ">
+          and ja.type = #{article.type}
+          </if>
 
         <if test="article.keyword!=null and article.keyword!=''">
             AND CONCAT(ja.title,ja.source_name)
@@ -594,4 +599,25 @@
         order by ja.create_time desc
 
     </select>
+
+    <select id="getAllList" resultType="org.springblade.modules.article.entity.Article">
+        SELECT
+        ja.*
+        FROM
+        jczz_article ja
+        where 1=1
+        and ja.is_deleted = 0
+        and ja.publish = 1
+        limit #{i},#{size}
+    </select>
+
+    <select id="getAllListTotal" resultType="java.lang.Integer">
+        SELECT
+        count(*)
+        FROM
+        jczz_article ja
+        where 1=1
+        and ja.is_deleted = 0
+        and ja.publish = 1
+    </select>
 </mapper>

--
Gitblit v1.9.3