INoticeRepository.cs 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. using System.Collections.Generic;
  2. using System.Threading.Tasks;
  3. using GxPress.Common.Page;
  4. using GxPress.Entity;
  5. using GxPress.Request.Notice;
  6. using GxPress.Result.Notice;
  7. using Datory;
  8. using GxPress.Result.Job;
  9. namespace GxPress.Repository.Interface
  10. {
  11. public interface INoticeRepository : IRepository
  12. {
  13. Task<Notice> GetAsync(SqlKata.Query query);
  14. Task<Notice> GetAsync(int id);
  15. Task<int> InsertAsync(NoticeInRequest request);
  16. /// <summary>
  17. /// 通知查询
  18. /// </summary>
  19. /// <param name="request"></param>
  20. /// <returns></returns>
  21. Task<PagedList<Notice>> GetNoticeByUserIdAsync(NoticePageSearchRequest request);
  22. /// <summary>
  23. /// 管理员删除通知
  24. /// </summary>
  25. /// <param name="id"></param>
  26. /// <returns></returns>
  27. Task<bool> AdminDeleteAsync(int id);
  28. /// <summary>
  29. /// 自己删除
  30. /// </summary>
  31. /// <param name="request"></param>
  32. /// <returns></returns>
  33. Task<bool> DeleteAsync(NoticeDeRequest request);
  34. Task<bool> DeleteAsync(SqlKata.Query query);
  35. /// <summary>
  36. /// 获取通知列表
  37. /// </summary>
  38. /// <param name="request"></param>
  39. /// <returns></returns>
  40. Task<PagedList<NoticeListPageResult>> GetNoticeListPageAsync(NoticePageSearchRequest request);
  41. /// <summary>
  42. /// 恢复删除的通知
  43. /// </summary>
  44. /// <param name="request"></param>
  45. /// <returns></returns>
  46. Task<bool> RecoverDeleteAsync(NoticeDeRequest request);
  47. /// <summary>
  48. /// 修改通知
  49. /// </summary>
  50. /// <param name="notice"></param>
  51. /// <returns></returns>
  52. Task<bool> UpdateNoticeAsync(Notice notice);
  53. Task<PagedList<NoticeListPageResult>> GetAdminNoticeByUserIdAsync(NoticePageSearchRequest request);
  54. Task<IEnumerable<Notice>> GetAllAsync();
  55. Task<List<JobNoticeResult>> ElasticSearchNotice();
  56. /// <summary>
  57. /// 通知修改
  58. /// </summary>
  59. /// <param name="id"></param>
  60. /// <param name="request"></param>
  61. /// <returns></returns>
  62. Task<bool> UpdateAsync(SqlKata.Query query);
  63. }
  64. }