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/district/mapper/DistrictMapper.xml | 23 +++++++++++++++++++----
1 files changed, 19 insertions(+), 4 deletions(-)
diff --git a/src/main/java/org/springblade/modules/district/mapper/DistrictMapper.xml b/src/main/java/org/springblade/modules/district/mapper/DistrictMapper.xml
index 4d44956..244a2c4 100644
--- a/src/main/java/org/springblade/modules/district/mapper/DistrictMapper.xml
+++ b/src/main/java/org/springblade/modules/district/mapper/DistrictMapper.xml
@@ -39,6 +39,19 @@
<if test="district.townStreetName !=null and district.townStreetName !=''">
and br.town_name like concat('%',#{district.townStreetName},'%')
</if>
+ <if test="isAdministrator==2">
+ <choose>
+ <when test="regionChildCodesList !=null and regionChildCodesList.size()>0">
+ and jd.community_code in
+ <foreach collection="regionChildCodesList" item="code" open="(" close=")" separator=",">
+ #{code}
+ </foreach>
+ </when>
+ <otherwise>
+ and jd.community_code in ('')
+ </otherwise>
+ </choose>
+ </if>
</select>
<!--小区树查询-->
@@ -46,17 +59,19 @@
SELECT
code as id,
parent_code as parentId,
- name
- FROM blade_region where district_code = '361102'
+ name,
+ remark aoiCode
+ FROM blade_region where district_code = '361102000000'
union all
(
select
id,
community_code as parentId,
- name
+ name,
+ aoi_code aoiCode
from jczz_district
where is_deleted = 0
- <if test="district.districtIdList!=null and district.districtIdList!=''">
+ <if test="district.districtIdList!=null and district.districtIdList.size() > 0">
and id in
<foreach collection="district.districtIdList" item="item" separator ="," open="(" close=")">
#{item}
--
Gitblit v1.9.3