| | |
| | | this.updateBatchById(worldCups); |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 获取比赛统计列表数据 |
| | | * @param worldCupGameStatistics |
| | | * @return |
| | | */ |
| | | @Override |
| | | public Map<String, Object> worldCupGameStatistics(WorldCupGameStatistics worldCupGameStatistics) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | List<Map<String, Object>> mapList = this.baseMapper.worldCupGameStatistics(worldCupGameStatistics); |
| | | for (Map<String, Object> stringObjectMap : mapList) { |
| | | Integer id = Integer.valueOf(stringObjectMap.get("id").toString()); |
| | | int count = worldCupCompetitorService.count(new QueryWrapper<WorldCupCompetitor>().eq("worldCupId", id)); |
| | | stringObjectMap.put("matchTime", count); |
| | | |
| | | List<WorldCupPayment> list = worldCupPaymentService.list(new QueryWrapper<WorldCupPayment>().eq("worldCupId", id) |
| | | .eq("payStatus", 2).eq("state", 1)); |
| | | List<Long> collect = list.stream().map(WorldCupPayment::getId).collect(Collectors.toList()); |
| | | if(collect.size() == 0){ |
| | | stringObjectMap.put("applicants", 0); |
| | | }else{ |
| | | int count1 = worldCupPaymentParticipantService.count(new QueryWrapper<WorldCupPaymentParticipant>() |
| | | .eq("worldCupId", id).in("worldCupPaymentId", collect) |
| | | .groupBy("worldCupPaymentId, participantType")); |
| | | stringObjectMap.put("applicants", count1); |
| | | } |
| | | } |
| | | int count = this.baseMapper.worldCupGameStatisticsCount(worldCupGameStatistics); |
| | | map.put("total", count); |
| | | return map; |
| | | } |
| | | } |