| | |
| | | <select id="selectDeptList" parameterType="SysDept" resultMap="SysDeptResult">
|
| | | <include refid="selectDeptVo"/>
|
| | | where d.del_flag = '0'
|
| | | <if test="deptId != null and deptId != 0">
|
| | | AND dept_id = #{deptId}
|
| | | </if>
|
| | | <if test="parentId != null and parentId != 0">
|
| | | AND parent_id = #{parentId}
|
| | | </if>
|
| | |
| | |
|
| | | <select id="hasChildByDeptId" parameterType="Long" resultType="int">
|
| | | select count(1) from sys_dept
|
| | | where del_flag = '0' and parent_id = #{deptId}
|
| | | where del_flag = '0' and parent_id = #{deptId} limit 1
|
| | | </select>
|
| | |
|
| | | <select id="selectChildrenDeptById" parameterType="Long" resultMap="SysDeptResult">
|
| | | select * from sys_dept where find_in_set(#{deptId}, ancestors)
|
| | | </select>
|
| | |
|
| | | <select id="selectNormalChildrenDeptById" parameterType="Long" resultType="java.lang.Integer">
|
| | | <select id="selectNormalChildrenDeptById" parameterType="Long" resultType="int">
|
| | | select count(*) from sys_dept where status = 0 and del_flag = '0' and find_in_set(#{deptId}, ancestors)
|
| | | </select>
|
| | |
|