| | |
| | | * @return |
| | | */ |
| | | @Override |
| | | public MyWorldCupInfo getMyWorldCupInfo(String id, String lon, String lat) { |
| | | public MyWorldCupInfo getMyWorldCupInfo(Long id, String lon, String lat) { |
| | | WorldCupPaymentParticipant worldCupPaymentParticipant = this.getById(id); |
| | | Integer worldCupId = worldCupPaymentParticipant.getWorldCupId(); |
| | | WorldCupPayment worldCupPayment = worldCupPaymentService.getById(worldCupPaymentParticipant.getWorldCupPaymentId()); |
| | |
| | | WorldCup worldCup = worldCupService.getById(worldCupId); |
| | | MyWorldCupInfo myWorldCupInfo = new MyWorldCupInfo(); |
| | | BeanUtils.copyProperties(worldCupInfo, myWorldCupInfo); |
| | | myWorldCupInfo.setId(worldCupPaymentParticipant.getId()); |
| | | myWorldCupInfo.setUnitPrice(worldCupPayment.getUnitPrice().doubleValue()); |
| | | myWorldCupInfo.setExpense(worldCupPayment.getAmount().doubleValue()); |
| | | myWorldCupInfo.setStatus(worldCup.getStatus()); |
| | |
| | | objects.add(map); |
| | | } |
| | | worldCupInfo.setStoreInfos(objects); |
| | | String address = worldCupInfo.getAddress(); |
| | | String province = worldCupInfo.getProvince(); |
| | | String city = worldCupInfo.getCity(); |
| | | int index = address.indexOf("市"); |
| | | if(index != -1){ |
| | | address = address.substring(index + 1); |
| | | worldCupInfo.setAddress(address); |
| | | } |
| | | index = province.indexOf("省"); |
| | | if(index != -1){ |
| | | province = province.substring(0, index - 1); |
| | | worldCupInfo.setProvince(province); |
| | | } |
| | | index = city.indexOf("市"); |
| | | if(index != -1){ |
| | | city = city.substring(0, index - 1); |
| | | worldCupInfo.setCity(city); |
| | | } |
| | | return myWorldCupInfo; |
| | | } |
| | | |
| | |
| | | .eq("payStatus", 2).eq("state", 1)); |
| | | List<Long> collect = list.stream().map(WorldCupPayment::getId).collect(Collectors.toList()); |
| | | List<ParticipantVo> datas = new ArrayList<>(); |
| | | Set<Integer> csry = new HashSet<>(); |
| | | Set<Integer> xy = new HashSet<>(); |
| | | Set<Long> csry = new HashSet<>(); |
| | | Set<Long> xy = new HashSet<>(); |
| | | if(collect.size() > 0){ |
| | | SimpleDateFormat sdf = new SimpleDateFormat("yyyy"); |
| | | List<WorldCupPaymentParticipant> list1 = this.list(new QueryWrapper<WorldCupPaymentParticipant>().in("worldCupPaymentId", collect)); |
| | |
| | | participantVo.setPhone(tStudent.getPhone()); |
| | | participantVo.setIsStudent(1); |
| | | datas.add(participantVo); |
| | | xy.add(participantId); |
| | | } |
| | | //参赛人员 |
| | | if(2 == participantType && !csry.contains(participantId)){ |
| | |
| | | participantVo.setPhone(participant.getPhone()); |
| | | participantVo.setIsStudent(0); |
| | | datas.add(participantVo); |
| | | csry.add(participantId); |
| | | } |
| | | } |
| | | } |