src/main/java/org/springblade/modules/jurisdiction/mapper/JurisdictionMapper.xml
@@ -113,4 +113,30 @@ sys_jurisdiction dept WHERE dept.is_deleted = 0 </select> <select id="lazyTreeJu" resultMap="treeNodeResultMap" > SELECT dept.id, dept.parent_id, dept.dept_name AS title, dept.id AS "value", dept.id AS "key", ( SELECT CASE WHEN COUNT ( 1 ) > 0 THEN 1 ELSE 0 END FROM sys_jurisdiction WHERE parent_id = dept.id AND is_deleted = 0 ) AS "has_children" FROM sys_jurisdiction dept WHERE dept.is_deleted = 0 </select> </mapper>