From 5c2fa39e408417cef23de9bb2eb3b776f6b34de6 Mon Sep 17 00:00:00 2001
From: zhongrj <646384940@qq.com>
Date: Tue, 26 Dec 2023 15:47:24 +0800
Subject: [PATCH] e户,轮播图,物业公司小区查询修改

---
 src/main/java/org/springblade/modules/rotation/mapper/RotationMapper.xml |   19 ++++++++++++++++---
 1 files changed, 16 insertions(+), 3 deletions(-)

diff --git a/src/main/java/org/springblade/modules/rotation/mapper/RotationMapper.xml b/src/main/java/org/springblade/modules/rotation/mapper/RotationMapper.xml
index 6927b5c..c2d3332 100644
--- a/src/main/java/org/springblade/modules/rotation/mapper/RotationMapper.xml
+++ b/src/main/java/org/springblade/modules/rotation/mapper/RotationMapper.xml
@@ -16,10 +16,23 @@
     </resultMap>
 
     <!--自定义分页查询-->
-    <select id="selectRotationPage" resultMap="rotationResultMap">
-        select * from jczz_rotation where is_deleted = 0
+    <select id="selectRotationPage" resultType="org.springblade.modules.rotation.vo.RotationVO">
+        select
+        jr.*,br.name as communityName
+        from jczz_rotation jr
+        left join blade_region br on br.code = jr.community_code
+        where jr.is_deleted = 0
         <if test="rotation.name!=null and rotation.name!=''">
-            and name like concat('%',#{rotation.name},'%')
+            and jr.name like concat('%',#{rotation.name},'%')
+        </if>
+        <if test="rotation.type!=null">
+            and jr.type = #{rotation.type}
+        </if>
+        <if test="rotation.communityName!=null and rotation.communityName!=''">
+            and br.name like concat('%',#{rotation.communityName},'%')
+        </if>
+        <if test="rotation.regionCode!=null and rotation.regionCode!=''">
+            and jr.community_code like concat('%',#{rotation.regionCode},'%')
         </if>
     </select>
 

--
Gitblit v1.9.3