部门列表接口

This commit is contained in:
zhenxianyimeng
2019-06-22 11:47:56 +08:00
parent b3322bf217
commit 68458fbfed
10 changed files with 204 additions and 17 deletions

View File

@@ -1,7 +1,11 @@
package cn.iocoder.mall.admin.api;
import cn.iocoder.common.framework.vo.PageResult;
import cn.iocoder.mall.admin.api.bo.deptment.DeptmentBO;
import cn.iocoder.mall.admin.api.dto.depetment.DeptmentAddDTO;
import cn.iocoder.mall.admin.api.dto.depetment.DeptmentPageDTO;
import java.util.List;
/**
* Description:
@@ -13,4 +17,10 @@ import cn.iocoder.mall.admin.api.dto.depetment.DeptmentAddDTO;
public interface DeptmentService {
DeptmentBO addDeptment(Integer adminId, DeptmentAddDTO deptmentAddDTO);
PageResult<DeptmentBO> getPageRootDeptment(DeptmentPageDTO deptmentPageDTO);
List<DeptmentBO> getAllDeptments();
List<DeptmentBO> getAllNotRootDeptment();
}

View File

@@ -0,0 +1,16 @@
package cn.iocoder.mall.admin.api.constant;
/**
* Description:
*
* @author: zhenxianyimeng
* @date: 2019-06-16
* @time: 23:15
*/
public interface DeptmentConstants {
/**
* 顶级部门的pid
*/
Integer PID_ROOT = 0;
}

View File

@@ -30,4 +30,6 @@ public class DeptmentAddDTO {
@NotNull(message = "可以为空默认0顶层")
@Min(value = 0,message = "父id不能小于0")
private Integer pid = 0;
}

View File

@@ -0,0 +1,19 @@
package cn.iocoder.mall.admin.api.dto.depetment;
import cn.iocoder.common.framework.vo.PageParam;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* Description:
*
* @author: zhenxianyimeng
* @date: 2019-06-21
* @time: 00:22
*/
@Data
public class DeptmentPageDTO extends PageParam {
@ApiModelProperty(value = "根部门名字", example = "研发部")
private String name;
}