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 |   73 +++++++++++++++++++++++++++++++++---
 1 files changed, 67 insertions(+), 6 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 0bfffc6..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
@@ -183,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:场地
@@ -265,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);
     }
@@ -383,7 +383,7 @@
      * @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));
@@ -418,8 +418,69 @@
     }
 
 
+    @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();
+        }
+    }
 
-//    public ResultUtil<MyWorldCupInfo> getMyWorldCupInfo(@RequestBody String id){
-//
-//    }
+
+
+
+    @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