IMiddleRepository.cs 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Text;
  4. using System.Threading.Tasks;
  5. using GxPress.Entity.Middle;
  6. using GxPress.Request.Notice;
  7. using SqlKata;
  8. using Datory;
  9. using GxPress.Request.App.Middle;
  10. namespace GxPress.Repository.Interface
  11. {
  12. public interface IMiddleRepository : IRepository
  13. {
  14. Task<int> InsertAsync(Middle middle);
  15. Task<bool> UpdateAsync(SqlKata.Query query);
  16. Task<bool> UpdateAsync(Middle middle);
  17. Task<IEnumerable<Middle>> FindAsync(SqlKata.Query query);
  18. Task<bool> DeleteAsync(SqlKata.Query query);
  19. Task<Middle> GetMiddleAsync(Query query);
  20. Task<Middle> GetMiddleAsync(int id);
  21. Task<bool> SetSortAsync(MiddleSortRequest request);
  22. Task<bool> SetTopAsync(int id);
  23. /// <summary>
  24. /// 删除
  25. /// </summary>
  26. /// <param name="request"></param>
  27. /// <returns></returns>
  28. Task<bool> DeleteAsync(NoticeDeRequest request);
  29. /// <summary>
  30. /// 阅读
  31. /// </summary>
  32. /// <param name="id"></param>
  33. /// <returns></returns>
  34. Task<bool> ReadAsync(int id);
  35. /// <summary>
  36. /// 恢复删除
  37. /// </summary>
  38. /// <param name="request"></param>
  39. /// <returns></returns>
  40. Task<bool> RecoverDeleteAsync(NoticeDeRequest request);
  41. Task<bool> UpdateFolderNameAsync(MiddleFolderNameRequest request);
  42. Task<bool> IsFolderAsync(int parentId);
  43. /// <summary>
  44. /// 根据用户ID文件夹ID查询小组数量
  45. /// </summary>
  46. /// <param name="userId"></param>
  47. /// <param name="folderId"></param>
  48. /// <param name="folderTypeId"></param>
  49. /// <returns></returns>
  50. Task<int> FindGroupCountAsync(int userId, int folderId, int folderTypeId);
  51. /// <summary>
  52. ///
  53. /// </summary>
  54. /// <param name="query"></param>
  55. /// <returns></returns>
  56. Task<int> CountAsync(SqlKata.Query query);
  57. /// <summary>
  58. /// 添加
  59. /// </summary>
  60. /// <param name="middle"></param>
  61. /// <returns></returns>
  62. Task<bool> InsertAsync(List<Middle> middles);
  63. Task<IEnumerable<Middle>> GetAllAsync(SqlKata.Query query);
  64. /// <summary>
  65. /// 获取下级数据
  66. /// </summary>
  67. /// <param name="id"></param>
  68. /// <returns></returns>
  69. Task<IEnumerable<Middle>> GetMiddleChildrenAsync(int id);
  70. }
  71. }