using System.Collections.Generic; using System.Threading.Tasks; using GxPress.Entity; using GxPress.Request.Department; using GxPress.Result.Department; using Datory; namespace GxPress.Repository.Interface { public interface IDepartmentRepository : IRepository { Task ExistsChildrenAsync(int parentId); Task GetAsync(int id); Task GetAsync(string name); Task GetNameAsync(int id); Task InsertAsync(Department department); Task UpdateAsync(Department department); Task> GetListAsync(int parentId); /// /// 添加 /// /// /// Task AddAsync(Department request); /// /// 删除 /// /// /// Task DeleteAsync(int id); /// /// 删除 /// /// /// Task DeleteAsync(SqlKata.Query query); /// /// 更新 /// /// /// /// Task UpdateAsync(int id, Department request); /// /// 获取树列表 /// /// /// Task> GetTreeAsync(int id); /// /// 根据部门ID获取成员以及下级部门 /// /// /// Task GetDepartmentUserResultAsync(DepartmentUserRequest request); /// /// 根据PID获取所用部门 /// /// /// /// /// /// 获取所用下级部门 /// /// /// /// Task> GetDepartmentById(int id, List departments); Task GetDepartmentFullPathAsync(int departmentId, string departmentName); /// /// 获取所用下级部门 /// /// /// /// Task> GetDepartmentByPid(int Pid, List departments); Task> GetAllAsync(SqlKata.Query query); } }