diff --git a/src/CloudGaming/Code/CloudGaming.Code/Game/GameBLL.cs b/src/CloudGaming/Code/CloudGaming.Code/Game/GameBLL.cs index a5e72e7..9f4f62f 100644 --- a/src/CloudGaming/Code/CloudGaming.Code/Game/GameBLL.cs +++ b/src/CloudGaming/Code/CloudGaming.Code/Game/GameBLL.cs @@ -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; } }