| | |
| | | |
| | | <select id="selectDirRecursive" resultType="com.lf.server.entity.data.DirEntity"> |
| | | with recursive rs as( |
| | | select a.*, fn_get_fullname(a.code, 2) fullName from lf.sys_dir a where name = #{name} |
| | | union |
| | | select b.*, fn_get_fullname(b.code, 2) fullName from lf.sys_dir b, rs c where b.pid = c.id |
| | | ) |
| | | select * from rs order by order_num; |
| | | select a.*, fn_get_fullname(a.code, 2) fullName from lf.sys_dir a where name = #{name} |
| | | union |
| | | select b.*, fn_get_fullname(b.code, 2) fullName from lf.sys_dir b, rs c where b.pid = c.id) |
| | | select * from rs |
| | | order by order_num; |
| | | </select> |
| | | |
| | | <select id="selectRecursiveById" resultType="com.lf.server.entity.data.DirEntity"> |
| | | with recursive rs as( |
| | | select a.*, fn_get_fullname(a.code, 2) fullName from lf.sys_dir a where id = #{id} |
| | | union |
| | | select b.*, fn_get_fullname(b.code, 2) fullName from lf.sys_dir b, rs c where b.pid = c.id |
| | | ) |
| | | select * from rs order by order_num; |
| | | select a.*, fn_get_fullname(a.code, 2) fullName from lf.sys_dir a where id = #{id} |
| | | union |
| | | select b.*, fn_get_fullname(b.code, 2) fullName from lf.sys_dir b, rs c where b.pid = c.id) |
| | | select * from rs |
| | | order by code; |
| | | </select> |
| | | |
| | | <select id="selectDirsForPrj" resultType="com.lf.server.entity.data.DirEntity"> |