懒羊羊
2024-01-31 e57a8990ae56f657a59c435a0613c5f7a8728003
提交 | 用户 | 时间
e57a89 1 package com.jcdm.system.mapper;
2
3 import java.util.List;
4 import org.apache.ibatis.annotations.Param;
5 import com.jcdm.common.core.domain.entity.SysDept;
6
7 /**
8  * 部门管理 数据层
9  * 
10  * @author jc
11  */
12 public interface SysDeptMapper
13 {
14     /**
15      * 查询部门管理数据
16      * 
17      * @param dept 部门信息
18      * @return 部门信息集合
19      */
20     public List<SysDept> selectDeptList(SysDept dept);
21
22     /**
23      * 根据角色ID查询部门树信息
24      * 
25      * @param roleId 角色ID
26      * @param deptCheckStrictly 部门树选择项是否关联显示
27      * @return 选中部门列表
28      */
29     public List<Long> selectDeptListByRoleId(@Param("roleId") Long roleId, @Param("deptCheckStrictly") boolean deptCheckStrictly);
30
31     /**
32      * 根据部门ID查询信息
33      * 
34      * @param deptId 部门ID
35      * @return 部门信息
36      */
37     public SysDept selectDeptById(Long deptId);
38
39     /**
40      * 根据ID查询所有子部门
41      * 
42      * @param deptId 部门ID
43      * @return 部门列表
44      */
45     public List<SysDept> selectChildrenDeptById(Long deptId);
46
47     /**
48      * 根据ID查询所有子部门(正常状态)
49      * 
50      * @param deptId 部门ID
51      * @return 子部门数
52      */
53     public int selectNormalChildrenDeptById(Long deptId);
54
55     /**
56      * 是否存在子节点
57      * 
58      * @param deptId 部门ID
59      * @return 结果
60      */
61     public int hasChildByDeptId(Long deptId);
62
63     /**
64      * 查询部门是否存在用户
65      * 
66      * @param deptId 部门ID
67      * @return 结果
68      */
69     public int checkDeptExistUser(Long deptId);
70
71     /**
72      * 校验部门名称是否唯一
73      * 
74      * @param deptName 部门名称
75      * @param parentId 父部门ID
76      * @return 结果
77      */
78     public SysDept checkDeptNameUnique(@Param("deptName") String deptName, @Param("parentId") Long parentId);
79
80     /**
81      * 新增部门信息
82      * 
83      * @param dept 部门信息
84      * @return 结果
85      */
86     public int insertDept(SysDept dept);
87
88     /**
89      * 修改部门信息
90      * 
91      * @param dept 部门信息
92      * @return 结果
93      */
94     public int updateDept(SysDept dept);
95
96     /**
97      * 修改所在部门正常状态
98      * 
99      * @param deptIds 部门ID组
100      */
101     public void updateDeptStatusNormal(Long[] deptIds);
102
103     /**
104      * 修改子元素关系
105      * 
106      * @param depts 子元素
107      * @return 结果
108      */
109     public int updateDeptChildren(@Param("depts") List<SysDept> depts);
110
111     /**
112      * 删除部门管理信息
113      * 
114      * @param deptId 部门ID
115      * @return 结果
116      */
117     public int deleteDeptById(Long deptId);
118 }