DeptService.java 1.7 KB
Newer Older
1 2 3
package me.zhengjie.modules.system.service;

import me.zhengjie.modules.system.domain.Dept;
D
dqjdda 已提交
4
import me.zhengjie.modules.system.service.dto.DeptDto;
5
import me.zhengjie.modules.system.service.dto.DeptQueryCriteria;
6 7 8

import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
9
import java.util.List;
10
import java.util.Set;
11 12

/**
13
* @author Zheng Jie
14 15 16 17
* @date 2019-03-25
*/
public interface DeptService {

D
dqjdda 已提交
18 19 20 21 22 23
    /**
     * 查询所有数据
     * @param criteria 条件
     * @return /
     */
    List<DeptDto> queryAll(DeptQueryCriteria criteria);
24

D
dqjdda 已提交
25 26 27 28 29 30
    /**
     * 根据ID查询
     * @param id /
     * @return /
     */
    DeptDto findById(Long id);
31

D
dqjdda 已提交
32 33 34 35 36 37
    /**
     * 创建
     * @param resources /
     * @return /
     */
    DeptDto create(Dept resources);
38

D
dqjdda 已提交
39 40 41 42
    /**
     * 编辑
     * @param resources /
     */
43 44
    void update(Dept resources);

D
dqjdda 已提交
45 46
    /**
     * 删除
E
Elune 已提交
47 48
     * @param deptDtos /
     *
D
dqjdda 已提交
49
     */
E
Elune 已提交
50
    void delete(Set<DeptDto> deptDtos);
51

D
dqjdda 已提交
52 53 54 55 56 57
    /**
     * 构建树形数据
     * @param deptDtos 原始数据
     * @return /
     */
    Object buildTree(List<DeptDto> deptDtos);
58

D
dqjdda 已提交
59 60 61 62 63
    /**
     * 根据PID查询
     * @param pid /
     * @return /
     */
64
    List<Dept> findByPid(long pid);
65

D
dqjdda 已提交
66 67 68 69 70
    /**
     * 根据角色ID查询
     * @param id /
     * @return /
     */
71
    Set<Dept> findByRoleIds(Long id);
72

D
dqjdda 已提交
73 74 75 76 77 78 79
    /**
     * 导出数据
     * @param queryAll 待导出的数据
     * @param response /
     * @throws IOException /
     */
    void download(List<DeptDto> queryAll, HttpServletResponse response) throws IOException;
E
Elune 已提交
80 81 82 83 84 85 86 87

    /**
     * 获取待删除的部门
     * @param deptList /
     * @param deptDtos /
     * @return /
     */
    Set<DeptDto> getDeleteDepts(List<Dept> deptList, Set<DeptDto> deptDtos);
88
}