DeptService.java 1.5 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 47 48
    /**
     * 删除
     * @param id /
     */
49 50
    void delete(Long id);

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

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

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

D
dqjdda 已提交
72 73 74 75 76 77 78
    /**
     * 导出数据
     * @param queryAll 待导出的数据
     * @param response /
     * @throws IOException /
     */
    void download(List<DeptDto> queryAll, HttpServletResponse response) throws IOException;
79
}