From 8b7258c9427882bb1798f1502eaa35184c6e374e Mon Sep 17 00:00:00 2001
From: linwe <872216996@qq.com>
Date: Fri, 09 Aug 2024 14:29:18 +0800
Subject: [PATCH] 短信指定楼栋发送

---
 src/main/java/org/springblade/modules/article/mapper/ArticleMapper.xml |   41 +++++++++++++++++++++++++++++++++++++++--
 1 files changed, 39 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 c79a502..1cf62e9 100644
--- a/src/main/java/org/springblade/modules/article/mapper/ArticleMapper.xml
+++ b/src/main/java/org/springblade/modules/article/mapper/ArticleMapper.xml
@@ -113,6 +113,12 @@
                 and (ja.article_range like concat('%',#{article.districtId},'%')
                 or ja.article_range is null or ja.article_range = '')
             </if>
+            <if test="article.districtIdList != null and article.districtIdList.size() > 0 ">
+                and (ja.article_range like
+                <foreach collection="article.districtIdList" separator=" or article_range like" item="id">'%${id}%'
+                </foreach>
+                ) or ja.article_range is null
+            </if>
 
             <if test="article.districtId == null ">
                 and ja.article_range is  null
@@ -172,6 +178,13 @@
             <if test="article.districtId != null and article.districtId != ''">
                 and (ja.article_range like concat('%',#{article.districtId},'%')
                 or ja.article_range is null)
+            </if>
+
+            <if test="article.districtIdList != null and article.districtIdList.size() > 0 ">
+                and (ja.article_range like
+                <foreach collection="article.districtIdList" separator=" or article_range like" item="id">'%${id}%'
+                </foreach>
+                ) or ja.article_range is null
             </if>
 
             <if test="article.building != null and article.building != ''">
@@ -552,7 +565,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 ">
@@ -583,7 +595,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)
@@ -598,4 +612,27 @@
         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
+        and ja.type = 0
+        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
+        and ja.type = 0
+    </select>
 </mapper>

--
Gitblit v1.9.3