|
@@ -156,4 +156,21 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
update sys_dept set del_flag = '2' where dept_id = #{deptId}
|
|
|
</delete>
|
|
|
|
|
|
+ <select id="selectDeptTreeNowList" parameterType="SysDept" resultMap="SysDeptResult">
|
|
|
+ <include refid="selectDeptVo"/>
|
|
|
+ where d.del_flag = '0'
|
|
|
+ <if test="deptId != null and deptId != 0">
|
|
|
+ AND (dept_id = #{deptId} or ancestors like concat('%', #{deptId}, '%')
|
|
|
+ </if>
|
|
|
+ <if test="parentId != null and parentId != 0">
|
|
|
+ AND parent_id = #{parentId}
|
|
|
+ </if>
|
|
|
+ <if test="status != null and status != ''">
|
|
|
+ AND status = #{status}
|
|
|
+ </if>
|
|
|
+ <!-- 数据范围过滤 -->
|
|
|
+ ${params.dataScope}
|
|
|
+ order by d.parent_id, d.order_num
|
|
|
+ </select>
|
|
|
+
|
|
|
</mapper>
|