1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 |
- using System.Collections.Generic;
- using System.Threading.Tasks;
- using Datory;
- using GxPress.Request.Department;
- namespace GxPress.Repository.Interface.DepartmentUser
- {
- public interface IDepartmentUserRepository : IRepository
- {
- /// <summary>
- /// 根据部门ID获取用户
- /// </summary>
- /// <param name="departmentId"></param>
- /// <returns></returns>
- Task<IEnumerable<int>> GetUserIdsAsync(int departmentId);
- /// <summary>
- /// 添加部门成员
- /// </summary>
- /// <param name="request"></param>
- /// <returns></returns>
- Task<bool> AddDepartmentUserAsync(DepartmentUserInRequest request);
- /// <summary>
- /// 添加部门成员
- /// </summary>
- /// <param name="request"></param>
- /// <returns></returns>
- Task<bool> AddDepartmentUserAsync(IEnumerable<int> departmentIds, int userId);
- /// <summary>
- /// 根据用户D获取部门ID
- /// </summary>
- /// <param name="departmentId"></param>
- /// <returns></returns>
- Task<IEnumerable<int>> GetDepartmentIdsAsync(int userId);
- /// <summary>
- /// 获取部门下面的所有用户
- /// </summary>
- /// <param name="departmentId"></param>
- /// <returns></returns>
- Task<IEnumerable<int>> GetUserIdsAsync();
- /// <summary>
- /// 判断是否有部门
- /// </summary>
- /// <param name="userId"></param>
- /// <returns></returns>
- Task<bool> IsExistsAsync(int userId);
- /// <summary>
- /// 根据部门ID集合获取用户
- /// </summary>
- /// <param name="departmentId"></param>
- /// <returns></returns>
- Task<IEnumerable<int>> GetUserIdsAsync(IEnumerable<int> departmentIds);
- /// <summary>
- /// 根据部门ID获取部门下面的所有用户
- /// </summary>
- /// <param name="departmentIds"></param>
- /// <returns></returns>
- Task<IEnumerable<int>> GetUserIdsByDepartmentIdsAsync(IEnumerable<int> departmentIds);
- }
- }
|