linwe
2023-12-01 5d5cd3ad979a0b85ab8c7034dcad1663fdcf71be
src/main/java/org/springblade/modules/district/mapper/DistrictMapper.xml
@@ -31,5 +31,34 @@
        </if>
    </select>
    <!--小区树查询-->
    <select id="getDistrictTree" resultType="org.springblade.common.node.TreeStringNode">
        SELECT
        code as id,
        parent_code as parentId,
        name
        FROM blade_region where district_code = '361102'
        union all
        (
        select
        id,
        community_code as parentId,
        name
        from jczz_district
        where is_deleted = 0
        )
    </select>
    <!--小区自定义获取详情查询-->
    <select id="getDetail" resultType="org.springblade.modules.district.vo.DistrictVO">
        SELECT
        jd.*,
        jda.nei_code as communityCode,jda.nei_name as communityName
        FROM jczz_district jd
        left join jczz_doorplate_address jda on jda.aoi_code = jd.aoi_code
        where jd.is_deleted = 0
        and jda.address_code = #{district.houseCode}
    </select>
</mapper>