86 lines
1.9 KiB
Java
86 lines
1.9 KiB
Java
|
package com.bocloud.sms.interfaces;
|
||
|
|
||
|
import com.megatron.common.exception.InternalServerException;
|
||
|
import com.megatron.common.model.GeneralResult;
|
||
|
import com.megatron.common.model.RequestContext;
|
||
|
import com.megatron.common.model.Result;
|
||
|
import com.bocloud.sms.entity.Department;
|
||
|
import com.bocloud.sms.entity.User;
|
||
|
import com.bocloud.sms.model.DepartmentModel;
|
||
|
|
||
|
import java.util.List;
|
||
|
|
||
|
/**
|
||
|
* 组织机构抽象Service接口
|
||
|
*
|
||
|
* @author tyl
|
||
|
*/
|
||
|
public interface DepartmentService {
|
||
|
|
||
|
/**
|
||
|
* 创建组织机构
|
||
|
*
|
||
|
* @param params
|
||
|
* @param requestContext
|
||
|
* @return
|
||
|
* @throws InternalServerException
|
||
|
*/
|
||
|
Result create(DepartmentModel params, RequestContext requestContext) throws InternalServerException;
|
||
|
|
||
|
/**
|
||
|
* 修改组织机构
|
||
|
*
|
||
|
* @param id
|
||
|
* @param params
|
||
|
* @param requestContext
|
||
|
* @return
|
||
|
* @throws InternalServerException
|
||
|
*/
|
||
|
Result modify(Long id, DepartmentModel params, RequestContext requestContext) throws InternalServerException;
|
||
|
|
||
|
/**
|
||
|
* 删除组织机构
|
||
|
*
|
||
|
* @param id
|
||
|
* @param requestContext
|
||
|
* @return
|
||
|
* @throws InternalServerException
|
||
|
*/
|
||
|
Result remove(Long id, RequestContext requestContext) throws InternalServerException;
|
||
|
|
||
|
/**
|
||
|
* 组织机构详情
|
||
|
*
|
||
|
* @param id
|
||
|
* @return
|
||
|
*/
|
||
|
GeneralResult<Department> detail(Long id);
|
||
|
|
||
|
/**
|
||
|
* 查询组织机构
|
||
|
*
|
||
|
* @param parentId
|
||
|
* @param requestContext
|
||
|
* @return
|
||
|
*/
|
||
|
GeneralResult<List<Department>> list(Long parentId, RequestContext requestContext);
|
||
|
|
||
|
/**
|
||
|
* 是否存在
|
||
|
*
|
||
|
* @param name
|
||
|
* @param tenantId
|
||
|
* @return
|
||
|
*/
|
||
|
GeneralResult<Department> exists(String name, Long tenantId);
|
||
|
|
||
|
/**
|
||
|
* 查询组织机构下管理员
|
||
|
*
|
||
|
* @param id
|
||
|
* @param requestContext
|
||
|
* @return
|
||
|
*/
|
||
|
GeneralResult<List<User>> listDeptManager(Long id, RequestContext requestContext);
|
||
|
}
|