| | |
| | | for (int i = 0; i < mapList.size(); i++) { |
| | | Map<String, Object> map = mapList.get(i); |
| | | Integer participantType = Integer.valueOf(map.get("participantType").toString()); |
| | | Integer participantId = Integer.valueOf(map.get("participantId").toString()); |
| | | Long participantId = Long.valueOf(map.get("participantId").toString()); |
| | | Integer num = Integer.valueOf(map.get("num").toString()); |
| | | if(null != participantId && participantId.equals(entrantRank.getId()) && participantType.equals(entrantRank.getIsStudent())){ |
| | | entrantRankVo.setNationalRank(i + 1); |
| | |
| | | for (int i = 0; i < mapList1.size(); i++) { |
| | | Map<String, Object> map = mapList1.get(i); |
| | | Integer participantType = Integer.valueOf(map.get("participantType").toString()); |
| | | Integer participantId = Integer.valueOf(map.get("participantId").toString()); |
| | | Long participantId = Long.valueOf(map.get("participantId").toString()); |
| | | Integer num = Integer.valueOf(map.get("num").toString()); |
| | | if(null != participantId && participantId.equals(entrantRank.getId()) && participantType.equals(entrantRank.getIsStudent())){ |
| | | entrantRankVo.setCityRank(i + 1); |
| | |
| | | matchRecord.setPageNo(pageNo); |
| | | MatchRecordVo matchRecordVo = new MatchRecordVo(); |
| | | int count = this.count(new QueryWrapper<WorldCupCompetitor>().eq("participantId", matchRecord.getId()) |
| | | .eq("participantType", matchRecord.getIsStudent())); |
| | | .eq("participantType", matchRecord.getIsStudent()).isNotNull("matchResult")); |
| | | matchRecordVo.setTotalSession(count); |
| | | List<MatchRecordList> matchRecord1 = this.baseMapper.getMatchRecord(matchRecord); |
| | | matchRecordVo.setList(matchRecord1); |
| | |
| | | } |
| | | //参赛人员 |
| | | if(participantType == 2){ |
| | | AppUser appUser1 = appUserClient.getAppUser(appUserId); |
| | | Participant participant = participantClient.getParticipant(participantId); |
| | | worldCupRankVo.setAvatar(appUser1.getHeadImg()); |
| | | worldCupRankVo.setAvatar(participant.getHeadImg()); |
| | | String name = participant.getName(); |
| | | if(name.length() > 2){ |
| | | name = name.charAt(0) + "*" + name.substring(2); |
| | |
| | | } |
| | | //参赛人员 |
| | | if(participantType == 2){ |
| | | AppUser appUser1 = appUserClient.getAppUser(appUserId); |
| | | Participant participant = participantClient.getParticipant(participantId); |
| | | worldCupRankVo.setAvatar(appUser1.getHeadImg()); |
| | | worldCupRankVo.setAvatar(participant.getHeadImg()); |
| | | String name = participant.getName(); |
| | | if(name.length() > 2){ |
| | | name = name.charAt(0) + "*" + name.substring(2); |
| | |
| | | if(ToolUtil.isNotEmpty(name) && tStudent.getName().indexOf(name) == -1){ |
| | | continue; |
| | | } |
| | | if(ToolUtil.isNotEmpty(phone) && tStudent.getPhone().indexOf(phone) == -1){ |
| | | if(ToolUtil.isNotEmpty(phone) && (ToolUtil.isEmpty(tStudent.getPhone()) ? appUser.getPhone() : tStudent.getPhone()).indexOf(phone) == -1){ |
| | | continue; |
| | | } |
| | | if(ToolUtil.isNotEmpty(idcard) && tStudent.getIdCard().indexOf(idcard) == -1){ |
| | |
| | | |
| | | map.put("name", tStudent.getName()); |
| | | map.put("phone", ToolUtil.isEmpty(tStudent.getPhone()) ? appUser.getPhone() : tStudent.getPhone()); |
| | | map.put("idcard", tStudent.getIdCard()); |
| | | }else{ |
| | | Participant participant = participantClient.getParticipant(participantId); |
| | | if(ToolUtil.isNotEmpty(name) && participant.getName().indexOf(name) == -1){ |
| | | continue; |
| | | } |
| | | if(ToolUtil.isNotEmpty(phone) && participant.getPhone().indexOf(phone) == -1){ |
| | | if(ToolUtil.isNotEmpty(phone) && (ToolUtil.isNotEmpty(participant.getPhone()) ? participant.getPhone() : appUser.getPhone()).indexOf(phone) == -1){ |
| | | continue; |
| | | } |
| | | if(ToolUtil.isNotEmpty(idcard) && participant.getIdcard().indexOf(idcard) == -1){ |
| | |
| | | |
| | | map.put("name", participant.getName()); |
| | | map.put("phone", ToolUtil.isNotEmpty(participant.getPhone()) ? participant.getPhone() : appUser.getPhone()); |
| | | map.put("idcard", participant.getIdcard()); |
| | | } |
| | | list.add(map); |
| | | } |
| | | map1.put("total", mapList.size()); |
| | | map1.put("total", list.size()); |
| | | Integer offset = worldCupGameStatisticsInfoList.getOffset(); |
| | | Integer limit = worldCupGameStatisticsInfoList.getLimit(); |
| | | limit += offset; |
| | | map1.put("rows", mapList.subList(offset, mapList.size() >= limit ? limit : mapList.size())); |
| | | map1.put("rows", list.subList(offset, list.size() >= limit ? limit : list.size())); |
| | | return map1; |
| | | } |
| | | |
| | |
| | | } |
| | | map.put("userName", participant.getName()); |
| | | } |
| | | map.put("score", ourScore.compareTo(opponentScore) > 0 ? |
| | | ourScore + ":" + opponentScore : |
| | | opponentScore + ":" + ourScore); |
| | | map.put("score", ourScore + ":" + opponentScore); |
| | | map.put("matchResult", matchResult == 1 ? "胜" : matchResult == 0 ? "平" :"负"); |
| | | mapList.add(map); |
| | | } |
| | |
| | | map.put("rows", mapList.subList(offset, mapList.size() >= limit ? limit : mapList.size())); |
| | | return map; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 获取比赛场次 |
| | | * @param worldCupId |
| | | * @return |
| | | */ |
| | | @Override |
| | | public int getMatchTime(Integer worldCupId) { |
| | | return this.baseMapper.getMatchTime(worldCupId); |
| | | } |
| | | } |