From b3b566ebdfed4005aaa513da3d5d2fd3924903cc Mon Sep 17 00:00:00 2001
From: linwei <872216696@qq.com>
Date: Wed, 31 Jan 2024 16:17:54 +0800
Subject: [PATCH] 拿不到地址总表数据,不设置网格信息
---
src/main/java/org/springblade/modules/community/mapper/CommunityMapper.xml | 22 ++++++++++++++++++----
1 files changed, 18 insertions(+), 4 deletions(-)
diff --git a/src/main/java/org/springblade/modules/community/mapper/CommunityMapper.xml b/src/main/java/org/springblade/modules/community/mapper/CommunityMapper.xml
index 614785d..f83bb14 100644
--- a/src/main/java/org/springblade/modules/community/mapper/CommunityMapper.xml
+++ b/src/main/java/org/springblade/modules/community/mapper/CommunityMapper.xml
@@ -24,7 +24,8 @@
<!--自定义分页列表查询-->
<select id="selectCommunityPage" resultType="org.springblade.modules.community.vo.CommunityVO">
select
- jc.*
+ jc.*,
+ br.town_name townName
from jczz_community jc
left join blade_region br on br.code = jc.code
where jc.is_deleted = 0
@@ -37,15 +38,28 @@
<if test="community.streetCode !=null and community.streetCode!=''">
and jc.street_code like concat('%',#{community.streetCode},'%')
</if>
- <if test="community.regionCode !=null and community.regionCode !=''">
- and jc.code like concat('%',#{community.regionCode},'%')
+ <if test="community.townName !=null and community.townName !=''">
+ and br.town_name like concat('%',#{community.townName},'%')
+ </if>
+ <if test="isAdministrator==2">
+ <choose>
+ <when test="regionChildCodesList !=null and regionChildCodesList.size()>0">
+ and jc.code in
+ <foreach collection="regionChildCodesList" item="code" open="(" close=")" separator=",">
+ #{code}
+ </foreach>
+ </when>
+ <otherwise>
+ and jc.code in ('')
+ </otherwise>
+ </choose>
</if>
</select>
<!--自定义分页列表查询-->
<select id="getCommunityCodeListByUserId" resultType="java.lang.String">
select code from jczz_community
- where is_deleted = 0 and res_police_user_id = #{userId}
+ where is_deleted = 0 and res_police_user_id like concat('%',#{userId},'%')
</select>
--
Gitblit v1.9.3