|
@@ -386,5 +386,55 @@ namespace GxPress.Repository.Implement.Media
|
|
|
query.ForPage(1, 10);
|
|
|
return await _repository.GetAllAsync<NavigationMediaResult>(query);
|
|
|
}
|
|
|
+ /// <summary>
|
|
|
+ /// 猜你喜欢
|
|
|
+ /// </summary>
|
|
|
+ /// <param name="mediaIds"></param>
|
|
|
+ /// <returns></returns>
|
|
|
+ public async Task<IEnumerable<NavigationMediaResult>> GetlikeMediaResults()
|
|
|
+ {
|
|
|
+ //获取媒体
|
|
|
+ var query = Q.NewQuery();
|
|
|
+ query.Select(nameof(Entity.tede2.Media.Media.Id));
|
|
|
+ query.Select(nameof(Entity.tede2.Media.Media.ImageUrls));
|
|
|
+ query.Select(nameof(Entity.tede2.Media.Media.Title));
|
|
|
+ query.Select(nameof(Entity.tede2.Media.Media.Summary));
|
|
|
+ query.Select(nameof(Entity.tede2.Media.Media.TeacherId));
|
|
|
+ query.Select(nameof(Entity.tede2.Media.Media.AutoNumber));
|
|
|
+ query.Select(nameof(Entity.tede2.Media.Media.Author));
|
|
|
+ query.Select(nameof(Entity.tede2.Media.Media.MediaType));
|
|
|
+ query.Where(nameof(Entity.tede2.Media.Media.IsTop), true);
|
|
|
+ query.Where(nameof(Entity.tede2.Media.Media.IsChecked), true);
|
|
|
+ query.Where(nameof(Entity.tede2.Media.Media.IsDelete), false);
|
|
|
+ query.OrderByDesc(nameof(Entity.tede2.Media.Media.IsTop));
|
|
|
+ query.OrderByDesc(nameof(Entity.tede2.Media.Media.IsRecommend));
|
|
|
+ query.ForPage(1, 10);
|
|
|
+ return await _repository.GetAllAsync<NavigationMediaResult>(query);
|
|
|
+ }
|
|
|
+ /// <summary>
|
|
|
+ /// 推荐
|
|
|
+ /// </summary>
|
|
|
+ /// <param name="mediaIds"></param>
|
|
|
+ /// <returns></returns>
|
|
|
+ public async Task<IEnumerable<NavigationMediaResult>> GetRecommendMediaResults()
|
|
|
+ {
|
|
|
+ //获取媒体
|
|
|
+ var query = Q.NewQuery();
|
|
|
+ query.Select(nameof(Entity.tede2.Media.Media.Id));
|
|
|
+ query.Select(nameof(Entity.tede2.Media.Media.ImageUrls));
|
|
|
+ query.Select(nameof(Entity.tede2.Media.Media.Title));
|
|
|
+ query.Select(nameof(Entity.tede2.Media.Media.Summary));
|
|
|
+ query.Select(nameof(Entity.tede2.Media.Media.TeacherId));
|
|
|
+ query.Select(nameof(Entity.tede2.Media.Media.AutoNumber));
|
|
|
+ query.Select(nameof(Entity.tede2.Media.Media.Author));
|
|
|
+ query.Select(nameof(Entity.tede2.Media.Media.MediaType));
|
|
|
+ query.Where(nameof(Entity.tede2.Media.Media.IsRecommend), true);
|
|
|
+ query.Where(nameof(Entity.tede2.Media.Media.IsChecked), true);
|
|
|
+ query.Where(nameof(Entity.tede2.Media.Media.IsDelete), false);
|
|
|
+ query.OrderByDesc(nameof(Entity.tede2.Media.Media.IsTop));
|
|
|
+ query.OrderByDesc(nameof(Entity.tede2.Media.Media.IsRecommend));
|
|
|
+ query.ForPage(1, 10);
|
|
|
+ return await _repository.GetAllAsync<NavigationMediaResult>(query);
|
|
|
+ }
|
|
|
}
|
|
|
}
|