| | |
| | | <result column="is_deleted" property="isDeleted"/> |
| | | </resultMap> |
| | | |
| | | <!--自定义分页--> |
| | | <select id="selectDistrictPage" resultType="org.springblade.modules.district.vo.DistrictVO"> |
| | | select * from jczz_district |
| | | where is_deleted = 0 |
| | | <if test="district.name !=null and district.name !=''"> |
| | | and name like concat('%',#{district.name},'%') |
| | | </if> |
| | | <if test="district.communityCode !=null and district.communityCode !=''"> |
| | | and community_code = #{district.communityCode} |
| | | </if> |
| | | </select> |
| | | |
| | | <select id="selectDistrictPage" resultMap="districtResultMap"> |
| | | select * from jczz_district where is_deleted = 0 |
| | | <!--小区树查询--> |
| | | <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> |
| | | |
| | | |