| | |
| | | where length(parent_code) < 12 |
| | | </select> |
| | | |
| | | <!--查询下级区域(拼接网格)--> |
| | | <select id="getRegionChildList" resultType="org.springblade.modules.system.entity.Region"> |
| | | SELECT |
| | | code,parent_code,name,ancestors,region_level,sort |
| | | FROM blade_region |
| | | where ancestors like concat('%',#{regionCode},'%') |
| | | union all |
| | | ( |
| | | SELECT |
| | | jg.grid_code as code, |
| | | jg.community_code as parent_code, |
| | | jg.grid_name as name, |
| | | '' as ancestors, |
| | | 6 as region_level, |
| | | jg.sort |
| | | FROM blade_region br |
| | | right join jczz_grid jg on jg.community_code = br.village_code and jg.is_deleted = 0 |
| | | where br.ancestors like concat('%',#{regionCode},'%') |
| | | ) |
| | | </select> |
| | | |
| | | </mapper> |