linwe
2024-08-09 8b7258c9427882bb1798f1502eaa35184c6e374e
src/main/java/org/springblade/modules/district/mapper/DistrictMapper.xml
@@ -61,7 +61,20 @@
        parent_code as parentId,
        name,
        remark aoiCode
        FROM blade_region where district_code = '361102000000'
        FROM blade_region where district_code like concat('361102','%')
        <if test="isAdministrator==2">
            <choose>
                <when test="regionChildCodesList !=null and regionChildCodesList.size()>0">
                    and code in
                    <foreach collection="regionChildCodesList" item="code" open="(" close=")" separator=",">
                        #{code}
                    </foreach>
                </when>
                <otherwise>
                    and code in ('')
                </otherwise>
            </choose>
        </if>
        union all
        (
        select
@@ -70,12 +83,25 @@
        name,
        aoi_code aoiCode
        from jczz_district
        where is_deleted = 0
        where is_deleted = 0 and community_code like concat('361102','%')
        <if test="district.districtIdList!=null and district.districtIdList.size() > 0">
            and id in
            <foreach collection="district.districtIdList" item="item" separator ="," open="("  close=")">
            <foreach collection="district.districtIdList" item="item" separator="," open="(" close=")">
                #{item}
            </foreach>
        </if>
        <if test="isAdministrator==2">
            <choose>
                <when test="regionChildCodesList !=null and regionChildCodesList.size()>0">
                    and community_code in
                    <foreach collection="regionChildCodesList" item="code" open="(" close=")" separator=",">
                        #{code}
                    </foreach>
                </when>
                <otherwise>
                    and community_code in ('')
                </otherwise>
            </choose>
        </if>
        )
    </select>
@@ -92,7 +118,7 @@
               jpo.phone
        FROM jczz_district jd
                 left join jczz_doorplate_address jda on jda.aoi_code = jd.aoi_code
                 LEFT JOIN jczz_party_organization jpo on jpo.area_id = jda.nei_code
                 LEFT JOIN jczz_party_organization jpo on jpo.area_id = jda.nei_code and jpo.is_deleted=0
        where jd.is_deleted = 0
          and jda.address_code = #{district.houseCode}
    </select>