jinlin
2023-11-03 35435e8b1995e6775c82b86652381e07e3faff54
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
/**
 * Copyright (c) 2018 人人开源 All rights reserved.
 *
 * https://www.renren.io
 *
 * 版权所有,侵权必究!
 */
 
package com.zt.core.sys.service;
 
import com.zt.core.sys.model.SysDept;
 
import java.util.List;
 
/**
 * 部门管理
 *
 * @author hehz
 */
public interface ISysDeptService {
 
    SysDept get(Long id);
 
    void insert(SysDept dept);
 
    void update(SysDept dept);
 
    void delete(Long id);
 
    /**
     * 通过deptId查找所有祖先,按照祖先的层级排序
     *
     * @param id
     * @return
     */
    List<SysDept> getAncestor(Long id);
 
    /**
     * 根据部门ID,获取本部门及子部门ID列表
     *
     * @param id
     *            部门ID
     */
    List<Long> getWithDescendantIds(Long id);
 
    /**
     * 获取下级
     *
     * @param id
     * @return
     */
    List<SysDept> getDescendant(Long id);
 
    /**
     * 获取某部门的子节点
     *
     * @param id
     * @return
     */
    List<SysDept> getChildren(Long id);
}