IMediaRepository.cs 5.0 KB

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