From ae935b68e75e7c90e27aecedefa971106927c38d Mon Sep 17 00:00:00 2001
From: zhongrj <646384940@qq.com>
Date: Mon, 08 Jan 2024 20:49:46 +0800
Subject: [PATCH] 上传接口link地址修改

---
 src/main/java/org/springblade/modules/place/mapper/PlaceExtMapper.xml |   31 +++++++++++++------------------
 1 files changed, 13 insertions(+), 18 deletions(-)

diff --git a/src/main/java/org/springblade/modules/place/mapper/PlaceExtMapper.xml b/src/main/java/org/springblade/modules/place/mapper/PlaceExtMapper.xml
index b7420bd..7c9a6c5 100644
--- a/src/main/java/org/springblade/modules/place/mapper/PlaceExtMapper.xml
+++ b/src/main/java/org/springblade/modules/place/mapper/PlaceExtMapper.xml
@@ -19,10 +19,18 @@
         jczz_place_ext jpe
         LEFT JOIN jczz_place jp ON jpe.place_id = jp.id
         AND jp.is_deleted = 0
+        LEFT JOIN jczz_grid_range jgr on jgr.house_code=jp.house_code
+        LEFT JOIN jczz_grid jg on jg.id = jgr.grid_id
         WHERE
         jpe.is_deleted = 0
+        <if test="placeExt.communityCode != null and placeExt.communityCode != ''">
+            and jg.community_code like concat('%',#{placeExt.communityCode},'%')
+        </if>
         <if test="placeExt.placeName != null and placeExt.placeName != ''">
             and jp.place_name like concat('%',#{placeExt.placeName},'%')
+        </if>
+        <if test="placeExt.placeId != null">
+            and jp.id = #{placeExt.placeId}
         </if>
         <if test="placeExt.houseCode != null and placeExt.houseCode != ''">
             and jp.house_code = #{placeExt.houseCode}
@@ -33,24 +41,11 @@
         <if test="placeExt.startTime != null and placeExt.startTime != '' and placeExt.endTime != null and placeExt.endTime != '' ">
             AND jpe.create_time BETWEEN #{placeExt.startTime} and #{placeExt.endTime}
         </if>
-        <if test="placeExt.roleName!=null and placeExt.roleName!='' and placeExt.createUser!=null">
-            <choose>
-                <when test="placeExt.roleName=='网格员'">
-                    and
-                    (
-                    jp.create_user = #{placeExt.createUser}
-                    <if test="houseCodeList != null and houseCodeList.size()>0">
-                        or jp.house_code in
-                        <foreach collection="houseCodeList" item="houseCode" separator="," open="(" close=")">
-                            #{houseCode}
-                        </foreach>
-                    </if>
-                    )
-                </when>
-                <otherwise>
-                    and jp.principal_user_id = #{placeExt.createUser}
-                </otherwise>
-            </choose>
+        <if test="houseCodeList != null and houseCodeList.size()>0">
+            and jp.house_code in
+            <foreach collection="houseCodeList" item="houseCode" separator="," open="(" close=")">
+                #{houseCode}
+            </foreach>
         </if>
         order by jpe.create_time desc,jpe.id desc
     </select>

--
Gitblit v1.9.3