liujie
3 天以前 dd556df997e268153bf1a74616f49b25db11ed3f
cloud-server-communityWorldCup/src/main/java/com/dsh/communityWorldCup/controller/WorldCupController.java
@@ -275,6 +275,16 @@
        if(0 == isStudent){
            isStudent = 2;
        }
        WorldCup worldCup = worldCupService.getById(worldCupPeople.getWorldCupId());
        if(null == worldCup){
            return ResultUtil.error("当前比赛不存在");
        }
        if(worldCup.getStartTime().getTime()>System.currentTimeMillis() || worldCup.getEndTime().getTime()<System.currentTimeMillis()){
            return ResultUtil.error("二维码仅支持在赛事有效期使用");
        }
        WorldCupPaymentParticipant worldCupPaymentParticipant = worldCupPaymentParticipantService.getOne(new QueryWrapper<WorldCupPaymentParticipant>()
                .eq("worldCupId", worldCupPeople.getWorldCupId()).eq("participantId", id).eq("participantType", isStudent)
                .orderByDesc("createTime").last(" limit 0, 1"));
@@ -351,6 +361,15 @@
            @ApiImplicitParam(name = "Authorization", value = "用户token(Bearer +token)", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9.....")
    })
    public ResultUtil startWorldCup(StartWorldCup startWorldCup){
        return worldCupService.startWorldCup(startWorldCup);
    }
    @ResponseBody
    @PostMapping("/api/worldCup/endWorldCup")
    @ApiOperation(value = "裁判结束比赛【3.1】", tags = {"APP-个人中心"})
    @ApiImplicitParams({
            @ApiImplicitParam(name = "Authorization", value = "用户token(Bearer +token)", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9.....")
    })
    public ResultUtil endWorldCup(StartWorldCup startWorldCup){
        return worldCupService.startWorldCup(startWorldCup);
    }
@@ -694,6 +713,26 @@
        }
    }
    @ResponseBody
    @PostMapping("/api/worldCup/getWorldCupListFromRank")
    @ApiOperation(value = "获取报名的赛事 排名使用【3.1】", tags = {"APP-个人中心"})
    @ApiImplicitParams({
            @ApiImplicitParam(name = "Authorization", value = "用户token(Bearer +token)", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9.....")
    })
    public ResultUtil<List<WorldCupListVo>> getWorldCupListFromRank(){
        try {
            Integer uid = tokenUtil.getUserIdFormRedis();
            if(null == uid){
                return ResultUtil.tokenErr();
            }
            List<WorldCupListVo> worldCupRank1 = worldCupCompetitorService.getWorldCupListFromRank(uid);
            return ResultUtil.success(worldCupRank1);
        }catch (Exception e){
            e.printStackTrace();
            return ResultUtil.runErr();
        }
    }
    /**
     * 获取学员参与数量