lin
2024-04-13 c565ed505c1762e0eaf3d5eaeb618b90478920b5
src/main/java/org/springblade/modules/district/mapper/DistrictMapper.xml
@@ -62,6 +62,19 @@
        name,
        remark aoiCode
        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
@@ -77,6 +90,19 @@
                #{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>