| | |
| | | <!--懒加载获取部门树形结构(包含用户数据)--> |
| | | <select id="lazyTreeUser" resultMap="treeNodeResultMap"> |
| | | select DISTINCT * from ( |
| | | (SELECT |
| | | (SELECT |
| | | dept.id, |
| | | dept.parent_id, |
| | | dept.dept_name AS title, |
| | |
| | | dept.is_deleted = 0 |
| | | and si.stats = 2 |
| | | and si.departmentid !=1432626178757275649 |
| | | <if test="parentId!=null and parentId!=0"> |
| | | and si.departmentid = 1111 |
| | | </if> |
| | | and si.departmentid !=1445980335107002370 |
| | | and si.departmentid !=1442115701350387714 |
| | | ) |
| | | <if test="parentId!=null and parentId!=0"> |
| | | union |
| | | (select |
| | | bu.id, |
| | | bu.dept_id parent_id, |
| | | real_name AS title, |
| | | bu.id AS "value", |
| | | bu.id AS "key", |
| | | 0 as "has_children" |
| | | from blade_user bu |
| | | left join |
| | | blade_dept bd |
| | | on |
| | | bd.id = bu.dept_id |
| | | left join |
| | | sys_information si |
| | | on |
| | | si.departmentid = bd.id |
| | | where bd.is_deleted = 0 |
| | | and bu.is_deleted = 0 |
| | | and bu.`status` =1 |
| | | and si.stats = 2 |
| | | and si.departmentid = #{parentId} |
| | | and si.departmentid !=1432626178757275649 |
| | | ) |
| | | </if> |
| | | union |
| | | (select |
| | | bu.id, |
| | | bu.dept_id parent_id, |
| | | real_name AS title, |
| | | bu.id AS "value", |
| | | bu.id AS "key", |
| | | 0 as "has_children" |
| | | from blade_user bu |
| | | left join |
| | | blade_dept bd |
| | | on |
| | | bd.id = bu.dept_id |
| | | left join |
| | | sys_information si |
| | | on |
| | | si.departmentid = bd.id |
| | | where bd.is_deleted = 0 |
| | | and bu.is_deleted = 0 |
| | | and bu.`status` =1 |
| | | and si.stats = 2 |
| | | and si.departmentid !=1432626178757275649 |
| | | and si.departmentid !=1445980335107002370 |
| | | and si.departmentid !=1442115701350387714 |
| | | ) |
| | | )c |
| | | </select> |
| | | |
| | |
| | | <!--懒加载获取部门树形结构(包含用户数据)--> |
| | | <select id="lazyTreeUsers" resultType="org.springblade.modules.system.node.TreeNodes" > |
| | | select DISTINCT |
| | | * |
| | | * |
| | | from ( |
| | | (SELECT |
| | | dept.id, |