| | |
| | | String[] split = paymentCompetitionVo.getIds().split(";"); |
| | | Competition competition = this.getById(paymentCompetitionVo.getId()); |
| | | |
| | | int competitionId = userCompetitionService.count(new QueryWrapper<UserCompetition>().eq("competitionId", paymentCompetitionVo.getId())); |
| | | List<PaymentCompetition> list = paymentCompetitionService.list(new QueryWrapper<PaymentCompetition>().eq("competitionId", paymentCompetitionVo.getId()).ne("payStatus", 3)); |
| | | List<Long> pays = new ArrayList<>(); |
| | | for (PaymentCompetition paymentCompetition : list) { |
| | | pays.add(paymentCompetition.getId()); |
| | | } |
| | | |
| | | int competitionId = 0; |
| | | if (!pays.isEmpty()) { |
| | | competitionId = userCompetitionService.count(new QueryWrapper<UserCompetition>().in("paymentCompetitionId", pays)); |
| | | } |
| | | |
| | | |
| | | // int competitionId = userCompetitionService.count(new QueryWrapper<UserCompetition>().eq("competitionId", paymentCompetitionVo.getId())); |
| | | if ((competitionId+split.length)>competition.getApplicantsNumber()){ |
| | | return ResultUtil.error("报名人数超过最大限制"); |
| | | } |