IAddressBookGroupRepository.cs 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. using System.Collections.Generic;
  2. using System.Threading.Tasks;
  3. using GxPress.Entity;
  4. using GxPress.Request.AddressBookGroup;
  5. using GxPress.Result.AddressBook;
  6. using Datory;
  7. using GxPress.Result.AddressBookGroup;
  8. namespace GxPress.Repository.Interface
  9. {
  10. public interface IAddressBookGroupRepository:IRepository
  11. {
  12. /// <summary>
  13. /// 删除
  14. /// </summary>
  15. /// <param name="id"></param>
  16. /// <returns></returns>
  17. Task<bool> DeleteAsync(int id);
  18. /// <summary>
  19. /// 修改
  20. /// </summary>
  21. /// <param name="request"></param>
  22. /// <returns></returns>
  23. Task<bool> UpdateAsync(AddressBookGroupUpRequest request);
  24. /// <summary>
  25. /// 获取
  26. /// </summary>
  27. /// <param name="request"></param>
  28. /// <returns></returns>
  29. Task<IEnumerable<AddressBookGroupResult>> GetAddressBookGroupListAsync(
  30. AddressBookGroupSearchRequest request);
  31. /// <summary>
  32. /// 添加
  33. /// </summary>
  34. /// <param name="request"></param>
  35. /// <returns></returns>
  36. Task<AddressBookGroup> InsertAsync(AddressBookGroupInRequest request);
  37. /// <summary>
  38. /// 获取用户通讯录组
  39. /// </summary>
  40. /// <param name="request"></param>
  41. /// <returns></returns>
  42. Task<AddressBookListResult> GetAddressBookListAsync(AddressBookListRequest request);
  43. /// <summary>
  44. /// 添加联系人
  45. /// </summary>
  46. /// <param name="request"></param>
  47. /// <returns></returns>
  48. Task<bool> InsertAddressBookUserAsync(AddressBookInUserRequest request);
  49. Task<List<User>> GetUserByDepartmentIdAsync(List<User> users, int departmentId);
  50. /// <summary>
  51. /// 根据通讯录PID获取用户
  52. /// </summary>
  53. /// <param name="users"></param>
  54. /// <param name="pid"></param>
  55. /// <param name="userId"></param>
  56. /// <returns></returns>
  57. Task<List<User>> GetUserByAddressBookGroupPidAsync(List<User> users, int pid,int userId);
  58. /// <summary>
  59. /// 根据组ID获取用户
  60. /// </summary>
  61. /// <param name="addressBookGroupId"></param>
  62. /// <returns></returns>
  63. Task<List<User>> GetUserByAddressBookGroupIdAsync(int addressBookGroupId);
  64. Task<List<AddressBookGroup>> GetAllAsync(SqlKata.Query query);
  65. /// <summary>
  66. /// 自建分组排序
  67. /// </summary>
  68. /// <param name="request"></param>
  69. /// <returns></returns>
  70. Task<bool> SortAsync(AddressBookGroupSortRequest request);
  71. }
  72. }