linwei
2024-01-19 d46ca134f82fd106bfbbbd71aef7184805e6d7e7
src/main/java/org/springblade/modules/system/mapper/RegionMapper.xml
@@ -119,7 +119,7 @@
        name
        FROM blade_region
        where 1=1
        and district_code = '361102'
        and district_code = '361102000000'
        <if test="region.parentCode!=null and region.parentCode!=''">
            and parent_code = #{region.parentCode}
        </if>
@@ -134,7 +134,7 @@
        code as id,
        parent_code as parentId,
        name
        FROM blade_region where district_code = '361102'
        FROM blade_region where district_code = '361102000000'
        and region_level = 4
        <if test="regionCode!=null  and regionCode!=''">
            and code = #{regionCode}
@@ -144,7 +144,7 @@
        code as id,
        parent_code as parentId,
        name
        FROM blade_region where district_code = '361102'
        FROM blade_region where district_code = '361102000000'
        and region_level = 4
        <if test="regionCode!=null  and regionCode!=''">
            and parent_code = #{regionCode}
@@ -161,4 +161,10 @@
        where region_level >0 and region_level &lt;4
    </select>
    <!--查询parentCode 长度少于12 的-->
    <select id="getCodeLess12DataList" resultType="org.springblade.modules.system.entity.Region">
        SELECT * FROM blade_region
        where length(parent_code) &lt; 12
    </select>
</mapper>