IMediaRepository.cs 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  1. using System.Collections.Generic;
  2. using System.Threading.Tasks;
  3. using Datory;
  4. using GxPress.Common.Page;
  5. using GxPress.Request.ArticleGroup;
  6. using GxPress.Request.Media;
  7. using GxPress.Result.Media;
  8. namespace GxPress.Repository.Interface.Media
  9. {
  10. public interface IMediaRepository : IRepository
  11. {
  12. Task<MediaResult> GetAsync(int id);
  13. Task<Entity.tede2.Media.Media> GetAsync(string autoNumber);
  14. /// <summary>
  15. /// 删除
  16. /// </summary>
  17. /// <param name="id"></param>
  18. /// <returns></returns>
  19. Task<bool> DeleteAsync(int id);
  20. /// <summary>
  21. /// 添加媒体
  22. /// </summary>
  23. /// <param name="result"></param>
  24. /// <returns></returns>
  25. Task<bool> InsertAsync(MediaResult result);
  26. Task<bool> UpdateAsync(MediaResult result);
  27. Task<bool> UpdateAsync(SqlKata.Query query);
  28. Task<PagedList<Entity.tede2.Media.Media>> GetAllAsync(MediaSearchRequest request);
  29. Task<int> CountAsync(string beginTime, string endTiem);
  30. Task<int> CountAsync(SqlKata.Query query);
  31. /// <summary>
  32. /// 获取书籍
  33. /// </summary>
  34. /// <param name="mediaId"></param>
  35. /// <returns></returns>
  36. Task<BookMediaResult> GetBookMediaResultAsync(int mediaId);
  37. /// <summary>
  38. /// 获取书籍
  39. /// </summary>
  40. /// <param name="mediaId"></param>
  41. /// <returns></returns>
  42. Task<VideoMediaResult> GetVideoMediaResultAsync(int mediaId);
  43. Task<IEnumerable<NavigationMediaResult>> GetNavigationMediaResults(IEnumerable<int> mediaLables, int page = 1, int pageSize = 10);
  44. /// <summary>
  45. /// 猜你喜欢
  46. /// </summary>
  47. /// <param name="mediaIds"></param>
  48. /// <returns></returns>
  49. Task<IEnumerable<NavigationMediaResult>> GetlikeMediaResults();
  50. /// <summary>
  51. /// 推荐
  52. /// </summary>
  53. /// <param name="mediaIds"></param>
  54. /// <returns></returns>
  55. Task<IEnumerable<NavigationMediaResult>> GetRecommendMediaResults();
  56. /// <summary>
  57. /// 排行榜
  58. /// </summary>
  59. /// <param name="request"></param>
  60. /// <returns></returns>
  61. Task<IEnumerable<RankingListResult>> GetRankingListResults(RankingListRequest request);
  62. /// <summary>
  63. /// 获取笔记摘录媒体
  64. /// </summary>
  65. /// <param name="query"></param>
  66. /// <returns></returns>
  67. Task<MediaNoteResult> GetAsync(SqlKata.Query query);
  68. /// <summary>
  69. /// 大咖讲座
  70. /// </summary>
  71. /// <returns></returns>
  72. Task<IEnumerable<MediaCathedraResult>> GetMediasByTeacherAsync(ArticleGroupRequest request);
  73. /// <summary>
  74. /// 大咖讲座
  75. /// </summary>
  76. /// <returns></returns>
  77. Task<int> GetMediasByTeacherCountAsync(ArticleGroupRequest request);
  78. /// <summary>
  79. /// 根据IDs
  80. /// </summary>
  81. /// <returns></returns>
  82. Task<IEnumerable<MediaCathedraResult>> GetMediaByLableIdsAsync(MediaIdsRequest request);
  83. /// <summary>
  84. /// 根据IDs
  85. /// </summary>
  86. /// <returns></returns>
  87. Task<PagedList<MediaCathedraResult>> GetMediaByLableIdAsync(MediaLableIdRequest request);
  88. /// <summary>
  89. /// 每日技能分页
  90. /// </summary>
  91. /// <returns></returns>
  92. Task<PagedList<MediaCathedraResult>> GetDaySkillsAsync(MediaDayWeBookRequest request);
  93. /// <summary>
  94. /// 每日技能
  95. /// </summary>
  96. /// <returns></returns>
  97. Task<SkillInfo> GetRandomDaySkillAsync();
  98. /// <summary>
  99. /// 猜你喜欢
  100. /// </summary>
  101. /// <returns></returns>
  102. Task<IEnumerable<MediaCathedraResult>> GetUserLikeAsync();
  103. /// <summary>
  104. /// 导航内容
  105. /// </summary>
  106. /// <returns></returns>
  107. Task<PagedList<MediaCathedraResult>> GetContentNavigationAsync(MediaContentNavigationRequest request);
  108. /// <summary>
  109. /// 排行榜分页
  110. /// </summary>
  111. /// <param name="request"></param>
  112. /// <returns></returns>
  113. Task<PagedList<RankingListResult>> GetRankingPageListResults(RankingListRequest request);
  114. /// <summary>
  115. /// 明栏分页
  116. /// </summary>
  117. /// <returns></returns>
  118. Task<PagedList<MediaCathedraResult>> GetStarLablePageAsync(MediaStarLableRequest request);
  119. /// <summary>
  120. /// 明栏分页
  121. /// </summary>
  122. /// <returns></returns>
  123. Task<IEnumerable<MediaCathedraResult>> GetStarLablesAsync(MediaStarLableRequest request);
  124. }
  125. }