| | |
| | | .eq(WorldCupPaymentParticipant::getAlreadyEntered, 0)); |
| | | ArrayList<WorldCupUserListVo> worldCupUserListVos = new ArrayList<>(); |
| | | if(list.size()>0){ |
| | | List<Integer> collect = list.stream().map(WorldCupPaymentParticipant::getAppUserId).collect(Collectors.toList()); |
| | | List<Long> collect = list.stream().map(WorldCupPaymentParticipant::getParticipantId).collect(Collectors.toList()); |
| | | search.setUseIds(collect); |
| | | List<AppUser> appUsers = appUserClient.queryAppUserByIds(search); |
| | | List<TStudent> appUsers = appUserClient.queryAppUserByIds(search); |
| | | |
| | | for (AppUser appUser : appUsers) { |
| | | for (TStudent appUser : appUsers) { |
| | | WorldCupUserListVo worldCupUserListVo = new WorldCupUserListVo(); |
| | | WorldCupPaymentParticipant worldCupPaymentParticipant = list.stream().filter(e -> e.getAppUserId().equals(appUser.getId())).findFirst().orElse(null); |
| | | WorldCupPaymentParticipant worldCupPaymentParticipant = list.stream().filter(e -> e.getParticipantId().toString().equals(appUser.getId().toString())).findFirst().orElse(null); |
| | | if(worldCupPaymentParticipant!=null){ |
| | | worldCupUserListVo.setId(worldCupPaymentParticipant.getId()); |
| | | worldCupUserListVo.setId(worldCupPaymentParticipant.getId().toString()); |
| | | worldCupUserListVo.setName(appUser.getName()); |
| | | worldCupUserListVo.setSex(appUser.getGender() !=null && appUser.getGender()==2?"女":"男"); |
| | | worldCupUserListVo.setSex(appUser.getSex() !=null && appUser.getSex()==2?"女":"男"); |
| | | worldCupUserListVo.setPhone(appUser.getPhone()); |
| | | worldCupUserListVo.setIdCard(appUser.getIdCard()); |
| | | // 当前日期和生日计算年龄 |
| | |
| | | String code = UUIDUtil.getTimeStr() + UUIDUtil.getNumberRandom(3); |
| | | ArrayList<WorldCupCompetitor> worldCupCompetitors = new ArrayList<>(red.length + blue.length); |
| | | for (String s : blue) { |
| | | WorldCupPaymentParticipant worldCupPaymentParticipant = list1.stream().filter(e -> e.getId().equals(s)).findFirst().orElse(null); |
| | | WorldCupPaymentParticipant worldCupPaymentParticipant = list1.stream().filter(e -> e.getId().toString().equals(s)).findFirst().orElse(null); |
| | | if(worldCupPaymentParticipant!=null){ |
| | | WorldCupCompetitor worldCupCompetitor =new WorldCupCompetitor(); |
| | | worldCupCompetitor.setCode(code); |
| | |
| | | worldCupCompetitor.setParticipant(1); |
| | | worldCupCompetitor.setStartTime(startTime); |
| | | worldCupCompetitor.setEndTime(endTime); |
| | | worldCupCompetitor.setOurScore(blueScore); |
| | | if(blueScore>redScore){ |
| | | worldCupCompetitor.setMatchResult(1); |
| | | worldCupCompetitor.setWinIntegral(worldCup.getWinIntegral()); |
| | |
| | | } |
| | | |
| | | for (String s : red) { |
| | | WorldCupPaymentParticipant worldCupPaymentParticipant = list1.stream().filter(e -> e.getId().equals(s)).findFirst().orElse(null); |
| | | WorldCupPaymentParticipant worldCupPaymentParticipant = list1.stream().filter(e -> e.getId().toString().equals(s)).findFirst().orElse(null); |
| | | if(worldCupPaymentParticipant!=null){ |
| | | WorldCupCompetitor worldCupCompetitor =new WorldCupCompetitor(); |
| | | worldCupCompetitor.setCode(code); |
| | |
| | | worldCupCompetitor.setParticipantType(worldCupPaymentParticipant.getParticipantType()); |
| | | worldCupCompetitor.setAppUserId(worldCupPaymentParticipant.getAppUserId()); |
| | | worldCupCompetitor.setParticipantId(worldCupPaymentParticipant.getParticipantId()); |
| | | worldCupCompetitor.setParticipant(1); |
| | | worldCupCompetitor.setParticipant(2); |
| | | worldCupCompetitor.setStartTime(startTime); |
| | | worldCupCompetitor.setEndTime(endTime); |
| | | worldCupCompetitor.setOurScore(redScore); |
| | | if(redScore>blueScore){ |
| | | worldCupCompetitor.setMatchResult(1); |
| | | worldCupCompetitor.setWinIntegral(worldCup.getWinIntegral()); |