puzhibing
2024-03-12 a1b33924831ae00398ae3cd75e4801b8b57cb89d
cloud-server-communityWorldCup/src/main/java/com/dsh/communityWorldCup/controller/WorldCupController.java
@@ -648,7 +648,10 @@
        worldCup.setProvinceCode(provinceCode);
        worldCup.setCity(city.replace("市", ""));
        worldCup.setCityCode(cityCode);
        worldCupService.updateById(worldCup);
        WorldCup worldCup1 = worldCupService.getById(worldCup.getId());
        worldCup.setCreateTime(worldCup1.getCreateTime());
        worldCup.setMatchNumber(worldCup1.getMatchNumber());
        worldCupService.updateWorldCupAll(worldCup);
        return worldCup.getId();
    }
@@ -828,4 +831,22 @@
    public Map<String, Object> userGameRecordList(@RequestBody UserGameRecordList userGameRecordList){
        return worldCupCompetitorService.userGameRecordList(userGameRecordList);
    }
    /**
     * 获取已报名人数
     * @param worldCupId
     * @return
     */
    @ResponseBody
    @PostMapping("/worldCup/getRegisteredNumber")
    public int getRegisteredNumber(@RequestBody Integer worldCupId){
        List<WorldCupPayment> list = worldCupPaymentService.list(new QueryWrapper<WorldCupPayment>().eq("worldCupId", worldCupId)
                .eq("payStatus", 2).eq("state", 1));
        List<Long> collect = list.stream().map(WorldCupPayment::getId).collect(Collectors.toList());
        if(collect.size() == 0){
            return 0;
        }
        return worldCupPaymentParticipantService.getCount(worldCupId, collect);
    }
}