From 32ca180560a3e09d0a4b1ab7567ea70180ef8070 Mon Sep 17 00:00:00 2001
From: puzhibing <393733352@qq.com>
Date: 星期五, 01 三月 2024 10:26:22 +0800
Subject: [PATCH] 修改bug

---
 cloud-server-communityWorldCup/src/main/java/com/dsh/communityWorldCup/controller/WorldCupController.java |  105 +++++++++++++++++++++++++++++++++++++++++++++++++++-
 1 files changed, 102 insertions(+), 3 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 076f753..6a82e60 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
@@ -17,6 +17,7 @@
 import com.dsh.communityWorldCup.feignclient.other.model.Site;
 import com.dsh.communityWorldCup.feignclient.other.model.Store;
 import com.dsh.communityWorldCup.model.*;
+import com.dsh.communityWorldCup.service.IWorldCupCompetitorService;
 import com.dsh.communityWorldCup.service.IWorldCupPaymentParticipantService;
 import com.dsh.communityWorldCup.service.IWorldCupService;
 import com.dsh.communityWorldCup.service.IWorldCupStoreService;
@@ -83,6 +84,9 @@
 
     @Autowired
     private IWorldCupStoreService worldCupStoreService;
+
+    @Autowired
+    private IWorldCupCompetitorService worldCupCompetitorService;
 
 
 
@@ -179,7 +183,7 @@
             @ApiImplicitParam(name = "code", value = "扫码结果", required = true, dataType = "String"),
             @ApiImplicitParam(name = "Authorization", value = "用户token(Bearer +token)", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9.....")
     })
-    public ResultUtil<Map<String, String>> getDeviceInformation(@RequestBody String code){
+    public ResultUtil<Map<String, String>> getDeviceInformation(String code){
         /**
          * {
          *     "scan_type": 0, // 扫码类型:1000:游戏,1001:课程,1002:场地
@@ -261,7 +265,7 @@
             @ApiImplicitParam(name = "id", value = "世界杯id", required = true, dataType = "int"),
             @ApiImplicitParam(name = "Authorization", value = "用户token(Bearer +token)", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9.....")
     })
-    public ResultUtil<WorldCupInfo> getWorldCupInfo(@RequestBody Integer id){
+    public ResultUtil<WorldCupInfo> getWorldCupInfo(Integer id){
         WorldCupInfo worldCupInfo = worldCupService.getWorldCupInfo(id);
         return ResultUtil.success(worldCupInfo);
     }
@@ -379,9 +383,104 @@
      * @return
      */
     @PostMapping("/worldCup/getWorldCupStoreList")
-    public List<WorldCupStore> getWorldCupStoreList(@RequestBody Integer storeId){
+    public List<WorldCupStore> getWorldCupStoreList(Integer storeId){
         List<WorldCup> worldCupList = worldCupService.list(new QueryWrapper<WorldCup>().in("status", Arrays.asList(1, 2)));
         List<Integer> collect = worldCupList.stream().map(WorldCup::getId).collect(Collectors.toList());
         return worldCupStoreService.list(new QueryWrapper<WorldCupStore>().eq("storeId", storeId).in("worldCupId", collect));
     }
+
+
+
+
+    @ResponseBody
+    @PostMapping("/api/worldCup/getEntrantRank")
+    @ApiOperation(value = "获取世界杯排名【2.0】", tags = {"APP-个人中心"})
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "Authorization", value = "用户token(Bearer +token)", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9.....")
+    })
+    public ResultUtil<EntrantRankVo> getEntrantRank(EntrantRank entrantRank){
+        EntrantRankVo entrantRank1 = worldCupCompetitorService.getEntrantRank(entrantRank);
+        return ResultUtil.success(entrantRank1);
+    }
+
+
+
+
+    @ResponseBody
+    @PostMapping("/api/worldCup/getMyWorldCupList")
+    @ApiOperation(value = "获取报名的世界杯列表【2.0】", tags = {"APP-个人中心"})
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "Authorization", value = "用户token(Bearer +token)", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9.....")
+    })
+    public ResultUtil<List<WorldCupListVo>> getMyWorldCupList(MyWorldCupList myWorldCupList){
+        List<WorldCupListVo> myWorldCupList1 = worldCupPaymentParticipantService.getMyWorldCupList(myWorldCupList);
+        return ResultUtil.success(myWorldCupList1);
+    }
+
+
+    @ResponseBody
+    @PostMapping("/api/worldCup/getParticipant")
+    @ApiOperation(value = "获取已报名的参赛人员【2.0】", tags = {"APP-个人中心"})
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "Authorization", value = "用户token(Bearer +token)", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9.....")
+    })
+    public ResultUtil<List<ParticipantVo>> getParticipant(){
+        try {
+            Integer uid = tokenUtil.getUserIdFormRedis();
+            if(null == uid){
+                return ResultUtil.tokenErr();
+            }
+            List<ParticipantVo> participant = worldCupPaymentParticipantService.getParticipant(uid);
+            return ResultUtil.success(participant);
+        }catch (Exception e){
+            e.printStackTrace();
+            return ResultUtil.runErr();
+        }
+    }
+
+
+
+
+    @ResponseBody
+    @PostMapping("/api/worldCup/getMyWorldCupInfo")
+    @ApiOperation(value = "获取已报名世界杯详情【2.0】", tags = {"APP-个人中心"})
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "id", value = "列表中的id", required = true, dataType = "String"),
+            @ApiImplicitParam(name = "Authorization", value = "用户token(Bearer +token)", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9.....")
+    })
+    public ResultUtil<MyWorldCupInfo> getMyWorldCupInfo(String id){
+        MyWorldCupInfo myWorldCupInfo = worldCupPaymentParticipantService.getMyWorldCupInfo(id);
+        return ResultUtil.success(myWorldCupInfo);
+    }
+
+
+
+
+    @ResponseBody
+    @PostMapping("/api/worldCup/getWorldCupMatchRecord")
+    @ApiOperation(value = "获取比赛记录【2.0】", tags = {"APP-个人中心"})
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "Authorization", value = "用户token(Bearer +token)", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9.....")
+    })
+    public ResultUtil<MatchRecordVo> getWorldCupMatchRecord(MatchRecord matchRecord){
+        MatchRecordVo matchRecord1 = worldCupCompetitorService.getMatchRecord(matchRecord);
+        return ResultUtil.success(matchRecord1);
+    }
+
+
+
+    @ResponseBody
+    @PostMapping("/api/worldCup/getWorldCupRank")
+    @ApiOperation(value = "获取比赛排名【2.0】", tags = {"APP-个人中心"})
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "Authorization", value = "用户token(Bearer +token)", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9.....")
+    })
+    public ResultUtil<List<WorldCupRankVo>> getWorldCupRank(WorldCupRank worldCupRank){
+        List<WorldCupRankVo> worldCupRank1 = worldCupCompetitorService.getWorldCupRank(worldCupRank);
+        return ResultUtil.success(worldCupRank1);
+    }
+
+
+
+
 }

--
Gitblit v1.7.1