From a9564eae9f0169ca39329b2f14a8f13d13358a0a Mon Sep 17 00:00:00 2001 From: nickchange <126672920+nickchange@users.noreply.github.com> Date: 星期五, 17 十一月 2023 15:28:44 +0800 Subject: [PATCH] 11.7 --- cloud-server-other/src/main/java/com/dsh/other/controller/BallController.java | 14 ++++++++++---- 1 files changed, 10 insertions(+), 4 deletions(-) diff --git a/cloud-server-other/src/main/java/com/dsh/other/controller/BallController.java b/cloud-server-other/src/main/java/com/dsh/other/controller/BallController.java index 6d352a3..979aa00 100644 --- a/cloud-server-other/src/main/java/com/dsh/other/controller/BallController.java +++ b/cloud-server-other/src/main/java/com/dsh/other/controller/BallController.java @@ -46,10 +46,16 @@ // 游戏id List<Integer> gamesId = gameService.list(new QueryWrapper<Game>().in("storeId", storeIds)) .stream().map(Game::getId).collect(Collectors.toList()); - // 根据游戏id获取游戏记录 获取用户Ids - List<Integer> userId = gameRecordService.list(new QueryWrapper<TGameRecord>().in("gameId", gamesId)) - .stream().map(TGameRecord::getUserId).collect(Collectors.toList()); - return userId; + if (gamesId.size() == 0){ + return new ArrayList<>(); + }else{ + // 根据游戏id获取游戏记录 获取用户Ids + List<Integer> userId = gameRecordService.list(new QueryWrapper<TGameRecord>().in("gameId", gamesId)) + .stream().map(TGameRecord::getUserId).collect(Collectors.toList()); + return userId; + } + + } @Autowired -- Gitblit v1.7.1