这里写自定义目录标题 SQL语句 SQL语句 select * from (SELECT d.*, (select count(1) from sys_depart dd where dd.parent_id = d.id) as count FROM sys_depart d) a where a.count=0