|
@@ -64,10 +64,24 @@ namespace GxPress.Service.Implement.AppHomePage
|
|
|
{
|
|
|
return await GetVipSupplyAsync(request);
|
|
|
}
|
|
|
-
|
|
|
+ //每日好书
|
|
|
+ if (request.StyleCss == "DayGoodBook")
|
|
|
+ {
|
|
|
+ return await GetDayGoodBookAsync(request);
|
|
|
+ }
|
|
|
return results;
|
|
|
}
|
|
|
/// <summary>
|
|
|
+ /// 每日好书
|
|
|
+ /// </summary>
|
|
|
+ /// <param name="request"></param>
|
|
|
+ /// <returns></returns>
|
|
|
+ public async Task<List<AppLabelResult<MediaCathedraResult>>> GetDayGoodBookAsync(ArticleGroupRequest request)
|
|
|
+ {
|
|
|
+ request.ActionUrl = "api/app/page/lable";
|
|
|
+ return await GetVipSupplyAsync(request);
|
|
|
+ }
|
|
|
+ /// <summary>
|
|
|
/// 每日好文
|
|
|
/// </summary>
|
|
|
/// <param name="request"></param>
|
|
@@ -125,11 +139,13 @@ namespace GxPress.Service.Implement.AppHomePage
|
|
|
//获取常规数据
|
|
|
var mediaCathedraResult = new AppLabelResult<MediaCathedraResult>()
|
|
|
{
|
|
|
- IsPage = false,
|
|
|
+ IsPage = item.IsPage,
|
|
|
Id = item.Id,
|
|
|
LabelName = item.LabelName,
|
|
|
ResourceType = 40,
|
|
|
- Items = list
|
|
|
+ Items = list,
|
|
|
+ Method = item.IsPage ? "post" : "",
|
|
|
+ ActionUrl = item.IsPage ? request.ActionUrl : ""
|
|
|
};
|
|
|
result.Add(mediaCathedraResult);
|
|
|
}
|
|
@@ -151,5 +167,15 @@ namespace GxPress.Service.Implement.AppHomePage
|
|
|
result.Total = await mediaRepository.GetMediasByTeacherCountAsync(request);
|
|
|
return result;
|
|
|
}
|
|
|
+ /// <summary>
|
|
|
+ /// 根据IDs
|
|
|
+ /// </summary>
|
|
|
+ /// <returns></returns>
|
|
|
+ public async Task<PagedList<MediaCathedraResult>> GetMediaByLableIdsAsync(MediaIdsRequest request)
|
|
|
+ {
|
|
|
+ var ids = await _mediaLableRepository.GetMediaIdsAysnc(request.LableId);
|
|
|
+ request.Ids = ids.ToList();
|
|
|
+ return await mediaRepository.GetMediaByLableIdsAsync(request);
|
|
|
+ }
|
|
|
}
|
|
|
}
|