lin
2024-04-16 2b1a74f4faa5a00a294bdc6a6d956c2e009cf467
src/main/java/org/springblade/modules/system/mapper/RegionMapper.xml
@@ -159,7 +159,20 @@
        jg.sort
        FROM jczz_grid jg
        left join blade_region br on br.village_code = jg.community_code and br.region_level = 5
        where jg.is_deleted = 0 and br.city_code = #{region.cityCode}
        where jg.is_deleted = 0 and jg.community_code like concat(#{region.cityCode},'%')
            <if test="isAdministrator==2">
                <choose>
                    <when test="regionChildCodesList !=null and regionChildCodesList.size()>0">
                        and jg.community_code in
                        <foreach collection="regionChildCodesList" item="code" open="(" close=")" separator=",">
                            #{code}
                        </foreach>
                    </when>
                    <otherwise>
                        and 1=1
                    </otherwise>
                </choose>
            </if>
        union all
        </if>
        SELECT
@@ -169,7 +182,7 @@
        sort
        FROM blade_region
        where 1=1
        and district_code = '361102'
        and district_code like concat(#{region.districtCode},'%')
        <if test="region.parentCode!=null and region.parentCode!=''">
            and parent_code = #{region.parentCode}
        </if>