From 2dda6304029c95e171b2f9e32406eb4600d77ebd Mon Sep 17 00:00:00 2001 From: 44323 <443237572@qq.com> Date: 星期三, 01 十一月 2023 18:57:58 +0800 Subject: [PATCH] 支付会员送券功能补充 运营商权限bug修改 --- cloud-server-other/src/main/java/com/dsh/other/controller/BallController.java | 20 ++++++++++++++++---- 1 files changed, 16 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 71585a9..6d352a3 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 @@ -5,10 +5,7 @@ import com.dsh.other.feignclient.model.AdvertisementChangeStateDTO; import com.dsh.other.feignclient.model.AdvertisementQuery; import com.dsh.other.model.BannerVo; -import com.dsh.other.service.GameService; -import com.dsh.other.service.IBannerService; -import com.dsh.other.service.IRegionService; -import com.dsh.other.service.TGameConfigService; +import com.dsh.other.service.*; import com.dsh.other.util.ResultUtil; import io.swagger.annotations.ApiImplicitParam; import io.swagger.annotations.ApiImplicitParams; @@ -22,6 +19,7 @@ import java.util.Date; import java.util.List; import java.util.Map; +import java.util.stream.Collectors; /** * @author zhibing.pu @@ -32,6 +30,8 @@ public class BallController { @Autowired private GameService gameService; + @Autowired + private TGameRecordService gameRecordService; @ResponseBody @PostMapping("/student/webStudentList") @@ -39,6 +39,18 @@ List<Game> games = gameService.queryAll(ballQueryDto); return games; } + // 根据门店ids 获取游戏记录 + @ResponseBody + @PostMapping("/game/getGameByStoreIds") + public List<Integer> getGameByStoreIds(@RequestBody List<Integer> storeIds){ + // 游戏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; + } @Autowired private IRegionService regionService; -- Gitblit v1.7.1