| | |
| | | private Integer relationship; |
| | | |
| | | /** |
| | | * 排序 |
| | | */ |
| | | private Integer sort; |
| | | |
| | | /** |
| | | * 父节点ID |
| | | */ |
| | | @JsonSerialize(using = ToStringSerializer.class) |
| | |
| | | <!--根据父编号查询所有的下级--> |
| | | <select id="getTreeList" resultType="org.springblade.common.node.TreeStringNode"> |
| | | <if test="region.cityCode!=null and region.cityCode!=''"> |
| | | SELECT |
| | | code as id, |
| | | parent_code as parentId, |
| | | name |
| | | FROM blade_region |
| | | where code = #{region.cityCode} |
| | | union all |
| | | SELECT |
| | | code as id, |
| | | parent_code as parentId, |
| | | name, |
| | | sort |
| | | FROM blade_region |
| | | where code = #{region.cityCode} |
| | | union all |
| | | select |
| | | grid_code as id, |
| | | community_code as parentId, |
| | | grid_name as name, |
| | | jg.sort |
| | | FROM jczz_grid jg |
| | | left join blade_region br on br.village_code = jg.community_code and br.region_level = 5 |
| | | where jg.is_deleted = 0 and br.city_code = #{region.cityCode} |
| | | union all |
| | | </if> |
| | | SELECT |
| | | code as id, |
| | | parent_code as parentId, |
| | | name |
| | | name, |
| | | sort |
| | | FROM blade_region |
| | | where 1=1 |
| | | and district_code = '361102000000' |