From 79bbee5adf0071808a33c09d5f87c5573d83cb3b Mon Sep 17 00:00:00 2001
From: nickchange <126672920+nickchange@users.noreply.github.com>
Date: 星期二, 21 十一月 2023 19:44:15 +0800
Subject: [PATCH] 11.21。1

---
 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