修改首页排行榜
This commit is contained in:
parent
a9091b8d3a
commit
bd79a1340e
|
|
@ -403,6 +403,20 @@ namespace CloudGaming.Code.Game
|
|||
gameListDtos.Add(new GameHistoryListDto(gameInfo, list[gameId], ImageResStyle.小LOGO));
|
||||
}
|
||||
}
|
||||
if (gameListDtos.Count < 20)
|
||||
{
|
||||
//gameListDtos.Add
|
||||
var gamelist = gameCache.DataList.Where(it => !gameListDtos.Any(game => game.GameId == it.GameId));
|
||||
var l = gamelist.OrderBy(it => new Random().Next(0, 999)).ToList();
|
||||
foreach (var g in l)
|
||||
{
|
||||
gameListDtos.Add(new GameHistoryListDto(g, 0, ImageResStyle.小LOGO));
|
||||
if (gameListDtos.Count > 20)
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
return gameListDtos;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user