From 0547707e29364a36df05c5afcddd37f30702421e Mon Sep 17 00:00:00 2001 From: 44323 <443237572@qq.com> Date: 星期三, 13 三月 2024 14:31:58 +0800 Subject: [PATCH] bug修改 --- cloud-server-communityWorldCup/src/main/java/com/dsh/communityWorldCup/controller/WorldCupController.java | 16 ++++++++++++++-- 1 files changed, 14 insertions(+), 2 deletions(-) diff --git a/cloud-server-communityWorldCup/src/main/java/com/dsh/communityWorldCup/controller/WorldCupController.java b/cloud-server-communityWorldCup/src/main/java/com/dsh/communityWorldCup/controller/WorldCupController.java index 9681a55..1cbcdaf 100644 --- a/cloud-server-communityWorldCup/src/main/java/com/dsh/communityWorldCup/controller/WorldCupController.java +++ b/cloud-server-communityWorldCup/src/main/java/com/dsh/communityWorldCup/controller/WorldCupController.java @@ -26,6 +26,7 @@ import io.swagger.annotations.ApiOperation; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import org.springframework.beans.BeanUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; @@ -98,8 +99,19 @@ */ @ResponseBody @PostMapping("/worldCup/getWorldCupStoreListByStoreId") - public List<WorldCupStore> getWorldCupStoreListByStoreId(@RequestBody Integer storeId){ - return worldCupStoreService.list(new QueryWrapper<WorldCupStore>().eq("storeId", storeId)); + public List<WorldCupStoreVO> getWorldCupStoreListByStoreId(@RequestBody Integer storeId){ + List<WorldCupStoreVO> res = new ArrayList<>(); + + List<WorldCupStore> storeId1 = worldCupStoreService.list(new QueryWrapper<WorldCupStore>().eq("storeId", storeId)); + for (WorldCupStore worldCupStore : storeId1) { + WorldCupStoreVO worldCupStoreVO = new WorldCupStoreVO(); + BeanUtils.copyProperties(worldCupStore,worldCupStoreVO); + // 查询世界杯活动名称 + WorldCup byId = worldCupService.getById(worldCupStore.getWorldCupId()); + worldCupStoreVO.setName(byId.getName()); + res.add(worldCupStoreVO); + } + return res; } /** * 根据门店id修改门店关系数据 -- Gitblit v1.7.1