|
@@ -13,6 +13,7 @@ using AutoMapper;
|
|
|
using System.Linq;
|
|
|
using GxPress.Common.Tools;
|
|
|
using GxPress.Common.Page;
|
|
|
+using GxPress.Request.Media;
|
|
|
|
|
|
namespace GxPress.Service.Implement.AppHomePage
|
|
|
{
|
|
@@ -63,10 +64,37 @@ namespace GxPress.Service.Implement.AppHomePage
|
|
|
{
|
|
|
return await GetVipSupplyAsync(request);
|
|
|
}
|
|
|
- //
|
|
|
+
|
|
|
return results;
|
|
|
}
|
|
|
/// <summary>
|
|
|
+ /// 每日好文
|
|
|
+ /// </summary>
|
|
|
+ /// <param name="request"></param>
|
|
|
+ /// <returns></returns>
|
|
|
+ public async Task<PagedList<MediaCathedraResult>> GetDayGoodTextAsync(MediaSearchRequest request)
|
|
|
+ {
|
|
|
+ var result = new PagedList<MediaCathedraResult>();
|
|
|
+ var model = await mediaRepository.GetAllAsync(request);
|
|
|
+ var list = new List<MediaCathedraResult>();
|
|
|
+ foreach (var item in model.Items)
|
|
|
+ {
|
|
|
+ var mediaCathedraResult = new MediaCathedraResult();
|
|
|
+ mediaCathedraResult.Author = item.Author;
|
|
|
+ mediaCathedraResult.CollectCount = item.CollectCount;
|
|
|
+ mediaCathedraResult.CreatedDate = item.CreatedDate;
|
|
|
+ mediaCathedraResult.Id = item.Id;
|
|
|
+ mediaCathedraResult.ImageUrls = item.ImageUrls;
|
|
|
+ mediaCathedraResult.MediaType = item.MediaType;
|
|
|
+ mediaCathedraResult.ReadCount = item.ReadCount;
|
|
|
+ mediaCathedraResult.Title = item.Title;
|
|
|
+ list.Add(mediaCathedraResult);
|
|
|
+ }
|
|
|
+ result.Total = model.Total;
|
|
|
+ result.Items = list;
|
|
|
+ return result;
|
|
|
+ }
|
|
|
+ /// <summary>
|
|
|
/// 会员特供
|
|
|
/// </summary>
|
|
|
/// <param name="request"></param>
|
|
@@ -88,7 +116,7 @@ namespace GxPress.Service.Implement.AppHomePage
|
|
|
{
|
|
|
//获取媒体标签
|
|
|
var mediaIds = await _mediaLableRepository.GetMediaIdsAysnc(item.Id);
|
|
|
- var medias = await mediaRepository.GetNavigationMediaResults(mediaIds,item.PageSize);
|
|
|
+ var medias = await mediaRepository.GetNavigationMediaResults(mediaIds, item.PageSize);
|
|
|
var list = new List<MediaCathedraResult>();
|
|
|
foreach (var mediaModel in medias)
|
|
|
{
|