From 41156504948b983a3273ef3a5641932ac80dfd76 Mon Sep 17 00:00:00 2001 From: puzhibing <393733352@qq.com> Date: 星期五, 15 三月 2024 18:37:21 +0800 Subject: [PATCH] 修改bug --- cloud-server-communityWorldCup/src/main/java/com/dsh/communityWorldCup/service/impl/WorldCupServiceImpl.java | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletions(-) diff --git a/cloud-server-communityWorldCup/src/main/java/com/dsh/communityWorldCup/service/impl/WorldCupServiceImpl.java b/cloud-server-communityWorldCup/src/main/java/com/dsh/communityWorldCup/service/impl/WorldCupServiceImpl.java index aa8c625..331aec0 100644 --- a/cloud-server-communityWorldCup/src/main/java/com/dsh/communityWorldCup/service/impl/WorldCupServiceImpl.java +++ b/cloud-server-communityWorldCup/src/main/java/com/dsh/communityWorldCup/service/impl/WorldCupServiceImpl.java @@ -173,6 +173,7 @@ ids.add(worldCupCompetitor.getId()); //已参赛 if(0 == worldCupPaymentParticipant.getAlreadyEntered()){ + worldCupPaymentParticipant.setWorldCupId(null); worldCupPaymentParticipant.setAlreadyEntered(1); worldCupPaymentParticipantService.updateById(worldCupPaymentParticipant); } @@ -593,7 +594,7 @@ List<CoursePackageOrderStudent> coursePackageOrderStudent = coursePackageOrderStudentClient.getCoursePackageOrderUser(paymentWorldCup.getUid()); int sum = coursePackageOrderStudent.stream().mapToInt(CoursePackageOrderStudent::getLaveClassHours).sum(); - if(sum < worldCup.getClassHour()){ + if(sum < worldCup.getClassHour() * num){ return ResultUtil.error("报名失败,课时不足,请续课!"); } @@ -840,6 +841,10 @@ } } + + WorldCup worldCup = this.getById(id); + worldCup.setStatus(4); + this.updateById(worldCup); } -- Gitblit v1.7.1