linwei
2024-01-19 7bc12c8ae5f7793dd4b2d512e830b84739a3a089
src/main/java/org/springblade/modules/system/mapper/RegionMapper.xml
@@ -123,8 +123,18 @@
        <if test="region.parentCode!=null and region.parentCode!=''">
            and parent_code = #{region.parentCode}
        </if>
        <if test="region.regionCode!=null and region.regionCode!=''">
            and code like concat('%',#{region.regionCode},'%')
        <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>
    </select>