IMediaRepository.cs 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. using System.Collections.Generic;
  2. using System.Threading.Tasks;
  3. using Datory;
  4. using GxPress.Common.Page;
  5. using GxPress.Request.Media;
  6. using GxPress.Result.Media;
  7. namespace GxPress.Repository.Interface.Media
  8. {
  9. public interface IMediaRepository : IRepository
  10. {
  11. Task<MediaResult> GetAsync(int id);
  12. Task<Entity.tede2.Media.Media> GetAsync(string autoNumber);
  13. /// <summary>
  14. /// 删除
  15. /// </summary>
  16. /// <param name="id"></param>
  17. /// <returns></returns>
  18. Task<bool> DeleteAsync(int id);
  19. /// <summary>
  20. /// 添加媒体
  21. /// </summary>
  22. /// <param name="result"></param>
  23. /// <returns></returns>
  24. Task<bool> InsertAsync(MediaResult result);
  25. Task<bool> UpdateAsync(MediaResult result);
  26. Task<bool> UpdateAsync(SqlKata.Query query);
  27. Task<PagedList<Entity.tede2.Media.Media>> GetAllAsync(MediaSearchRequest request);
  28. Task<int> CountAsync(string beginTime, string endTiem);
  29. Task<int> CountAsync(SqlKata.Query query);
  30. /// <summary>
  31. /// 获取书籍
  32. /// </summary>
  33. /// <param name="mediaId"></param>
  34. /// <returns></returns>
  35. Task<BookMediaResult> GetBookMediaResultAsync(int mediaId);
  36. /// <summary>
  37. /// 获取书籍
  38. /// </summary>
  39. /// <param name="mediaId"></param>
  40. /// <returns></returns>
  41. Task<VideoMediaResult> GetVideoMediaResultAsync(int mediaId);
  42. Task<IEnumerable<NavigationMediaResult>> GetNavigationMediaResults(IEnumerable<int> mediaLables);
  43. /// <summary>
  44. /// 猜你喜欢
  45. /// </summary>
  46. /// <param name="mediaIds"></param>
  47. /// <returns></returns>
  48. Task<IEnumerable<NavigationMediaResult>> GetlikeMediaResults();
  49. /// <summary>
  50. /// 推荐
  51. /// </summary>
  52. /// <param name="mediaIds"></param>
  53. /// <returns></returns>
  54. Task<IEnumerable<NavigationMediaResult>> GetRecommendMediaResults();
  55. /// <summary>
  56. /// 排行榜
  57. /// </summary>
  58. /// <param name="request"></param>
  59. /// <returns></returns>
  60. Task<IEnumerable<RankingListResult>> GetRankingListResults(RankingListRequest request);
  61. }
  62. }