44323
2024-03-13 0547707e29364a36df05c5afcddd37f30702421e
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修改门店关系数据