| | |
| | | @Resource |
| | | private StudentClient studentClient; |
| | | @PostMapping("/base/competition/getPeopleFromId1") |
| | | public List<CompetitionUser> getPeopleFromId1(@RequestBody GetPeopleQuery getPeopleQuery) { |
| | | public Page<CompetitionUser> getPeopleFromId1(@RequestBody GetPeopleQuery getPeopleQuery) { |
| | | try { |
| | | Page<UserCompetition> participantPage = new Page<>(getPeopleQuery.getOffset(), getPeopleQuery.getLimit()); |
| | | List<CompetitionUser> page = participantService.getPeopleFromId1(participantPage, getPeopleQuery.getId(), getPeopleQuery.getState()); |
| | | |
| | | List<CompetitionUser> users = new ArrayList<>(); |
| | | List<UserCompetition> coms = userCompetitionService.list(new QueryWrapper<UserCompetition>().eq("competitionId", getPeopleQuery.getId())); |
| | | for (UserCompetition com : coms) { |
| | | int number = com.getParticipantId(); |
| | | String numberString = Integer.toString(number); |
| | | int digitCount = numberString.length(); |
| | | if (digitCount!=9){ |
| | | TStudent tStudent = studentClient.queryById(number); |
| | | CompetitionUser competitionUser = new CompetitionUser(); |
| | | competitionUser.setName(tStudent.getName()); |
| | | competitionUser.setPhone(tStudent.getPhone()); |
| | | competitionUser.setSex(tStudent.getSex()); |
| | | competitionUser.setIdCard(tStudent.getIdCard()); |
| | | competitionUser.setState(tStudent.getState()); |
| | | users.add(competitionUser); |
| | | } |
| | | } |
| | | page.addAll(users); |
| | | |
| | | Page<CompetitionUser> page = participantService.getPeopleFromId1(getPeopleQuery.getOffset(), getPeopleQuery.getLimit(), getPeopleQuery.getId(), getPeopleQuery.getState()); |
| | | return page; |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |