|
@@ -217,6 +217,11 @@ namespace GxPress.Api.AppControllers
|
|
|
dictionary.Add(3, "课程榜");
|
|
|
dictionary.Add(4, "文献头条");
|
|
|
dictionary.Add(6, "试听榜");
|
|
|
+ var dictionaryMedia = new Dictionary<int, string>();
|
|
|
+ dictionaryMedia.Add(AllTypeConst.Book.GetHashCode(), "热书榜");
|
|
|
+ dictionaryMedia.Add(AllTypeConst.Curriculum.GetHashCode(), "课程榜");
|
|
|
+ dictionaryMedia.Add(AllTypeConst.Article.GetHashCode(), "文献头条");
|
|
|
+ dictionaryMedia.Add(AllTypeConst.Audio.GetHashCode(), "试听榜");
|
|
|
var result = new List<MediaRankingResult>();
|
|
|
foreach (var item in dictionary)
|
|
|
{
|
|
@@ -225,6 +230,11 @@ namespace GxPress.Api.AppControllers
|
|
|
request.DataTypeValue = item.Key;
|
|
|
mediaRankingResult.Name = item.Value;
|
|
|
mediaRankingResult.RankingListResults = await mediaRepository.GetRankingListResults(request);
|
|
|
+ foreach (var dic in dictionaryMedia)
|
|
|
+ {
|
|
|
+ if (dic.Value.Equals(item.Value))
|
|
|
+ mediaRankingResult.MediaType = dic.Key;
|
|
|
+ }
|
|
|
result.Add(mediaRankingResult);
|
|
|
}
|
|
|
return result;
|