From c3ac8adc5af7d04193c70d09c029e37efef8144d Mon Sep 17 00:00:00 2001
From: lin <sbla5888@163.com>
Date: Wed, 28 Feb 2024 15:07:36 +0800
Subject: [PATCH] 街道管理员查询不出物业公司(物业公司加一列)

---
 src/main/java/org/springblade/modules/article/mapper/ArticleMapper.xml |   14 +++++++++++---
 1 files changed, 11 insertions(+), 3 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 7d0625e..be346dd 100644
--- a/src/main/java/org/springblade/modules/article/mapper/ArticleMapper.xml
+++ b/src/main/java/org/springblade/modules/article/mapper/ArticleMapper.xml
@@ -113,12 +113,12 @@
 
             <if test="article.districtId != null and article.districtId != ''">
                 and (ja.article_range like concat('%',#{article.districtId},'%')
-                or ja.article_range is null)
+                or ja.article_range is null or ja.article_range  = '')
             </if>
 
             <if test="article.userId != null">
-                and (jpd.appoint_user like concat('%',#{article.userId},'%')
-                or jpd.appoint_user is null)
+                and (jpd.user_ids like concat('%',#{article.userId},'%')
+                OR jpd.user_ids IS NULL or jpd.user_ids  = '')
             </if>
 
             <if test="article.building != null and article.building != ''">
@@ -545,8 +545,16 @@
         jczz_article ja
         LEFT JOIN jczz_district jd ON ja.district_id = jd.id
         LEFT JOIN blade_region br on br.`code` = jd.community_code
+        LEFT JOIN jczz_public_discuss jpd on jpd.article_id=ja.id
         where 1=1
         and ja.is_deleted = 0
+
+        <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 ">
             <if test="article.communityName!=null and article.communityName!=''">
                 and br.`village_name` like concat('%',#{article.communityName},'%')

--
Gitblit v1.9.3