1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889 |
- using System.Collections.Generic;
- using System.Threading.Tasks;
- using Datory;
- using GxPress.Common.Page;
- using GxPress.Request.ArticleGroup;
- using GxPress.Request.Media;
- using GxPress.Result.Media;
- namespace GxPress.Repository.Interface.Media
- {
- public interface IMediaRepository : IRepository
- {
- Task<MediaResult> GetAsync(int id);
- Task<Entity.tede2.Media.Media> GetAsync(string autoNumber);
- /// <summary>
- /// 删除
- /// </summary>
- /// <param name="id"></param>
- /// <returns></returns>
- Task<bool> DeleteAsync(int id);
- /// <summary>
- /// 添加媒体
- /// </summary>
- /// <param name="result"></param>
- /// <returns></returns>
- Task<bool> InsertAsync(MediaResult result);
- Task<bool> UpdateAsync(MediaResult result);
- Task<bool> UpdateAsync(SqlKata.Query query);
- Task<PagedList<Entity.tede2.Media.Media>> GetAllAsync(MediaSearchRequest request);
- Task<int> CountAsync(string beginTime, string endTiem);
- Task<int> CountAsync(SqlKata.Query query);
- /// <summary>
- /// 获取书籍
- /// </summary>
- /// <param name="mediaId"></param>
- /// <returns></returns>
- Task<BookMediaResult> GetBookMediaResultAsync(int mediaId);
- /// <summary>
- /// 获取书籍
- /// </summary>
- /// <param name="mediaId"></param>
- /// <returns></returns>
- Task<VideoMediaResult> GetVideoMediaResultAsync(int mediaId);
- Task<IEnumerable<NavigationMediaResult>> GetNavigationMediaResults(IEnumerable<int> mediaLables, int pageSize = 10);
- /// <summary>
- /// 猜你喜欢
- /// </summary>
- /// <param name="mediaIds"></param>
- /// <returns></returns>
- Task<IEnumerable<NavigationMediaResult>> GetlikeMediaResults();
- /// <summary>
- /// 推荐
- /// </summary>
- /// <param name="mediaIds"></param>
- /// <returns></returns>
- Task<IEnumerable<NavigationMediaResult>> GetRecommendMediaResults();
- /// <summary>
- /// 排行榜
- /// </summary>
- /// <param name="request"></param>
- /// <returns></returns>
- Task<IEnumerable<RankingListResult>> GetRankingListResults(RankingListRequest request);
- /// <summary>
- /// 获取笔记摘录媒体
- /// </summary>
- /// <param name="query"></param>
- /// <returns></returns>
- Task<MediaNoteResult> GetAsync(SqlKata.Query query);
- /// <summary>
- /// 大咖讲座
- /// </summary>
- /// <returns></returns>
- Task<IEnumerable<MediaCathedraResult>> GetMediasByTeacherAsync(ArticleGroupRequest request);
- /// <summary>
- /// 大咖讲座
- /// </summary>
- /// <returns></returns>
- Task<int> GetMediasByTeacherCountAsync(ArticleGroupRequest request);
- /// <summary>
- /// 根据IDs
- /// </summary>
- /// <returns></returns>
- Task<PagedList<MediaCathedraResult>> GetMediaByLableIdsAsync(MediaIdsRequest request);
- }
- }
|