From 18b58aaf9bd99cadd0e7f80fe5d80586f2f4831a Mon Sep 17 00:00:00 2001 From: nickchange <126672920+nickchange@users.noreply.github.com> Date: 星期五, 24 十一月 2023 18:32:43 +0800 Subject: [PATCH] 11.24 --- cloud-server-competition/src/main/java/com/dsh/competition/service/impl/PaymentCompetitionServiceImpl.java | 26 ++++++++++++++------------ 1 files changed, 14 insertions(+), 12 deletions(-) diff --git a/cloud-server-competition/src/main/java/com/dsh/competition/service/impl/PaymentCompetitionServiceImpl.java b/cloud-server-competition/src/main/java/com/dsh/competition/service/impl/PaymentCompetitionServiceImpl.java index 796705b..d8c5a39 100644 --- a/cloud-server-competition/src/main/java/com/dsh/competition/service/impl/PaymentCompetitionServiceImpl.java +++ b/cloud-server-competition/src/main/java/com/dsh/competition/service/impl/PaymentCompetitionServiceImpl.java @@ -198,17 +198,19 @@ participant.add(participantVo); } + for (Integer i : collect) { TStudent tStudent = studentClient.queryById(i); - ParticipantVo participantVo = new ParticipantVo(); - participantVo.setId(tStudent.getId()); - participantVo.setName(tStudent.getName()); - participantVo.setIdcard(tStudent.getIdCard()); - Integer age = Integer.valueOf(sdf_year.format(new Date())) - Integer.valueOf(sdf_year.format(tStudent.getBirthday())); - participantVo.setAge(age); - participantVo.setPhone(tStudent.getPhone()); - participant.add(participantVo); - + if (tStudent!=null) { + ParticipantVo participantVo = new ParticipantVo(); + participantVo.setId(tStudent.getId()); + participantVo.setName(tStudent.getName()); + participantVo.setIdcard(tStudent.getIdCard()); + Integer age = Integer.valueOf(sdf_year.format(new Date())) - Integer.valueOf(sdf_year.format(tStudent.getBirthday())); + participantVo.setAge(age); + participantVo.setPhone(tStudent.getPhone()); + participant.add(participantVo); + } } @@ -270,7 +272,7 @@ paymentCompetition.setAppUserId(null); this.updateById(paymentCompetition); - competition.setApplicantsNumber(competition.getApplicantsNumber() - 1); +// competition.setApplicantsNumber(competition.getApplicantsNumber() - 1); competitionService.updateById(competition); } if(paymentCompetition.getPayType() == 3){//玩湃币支付 @@ -284,7 +286,7 @@ paymentCompetition.setAppUserId(null); this.updateById(paymentCompetition); - competition.setApplicantsNumber(competition.getApplicantsNumber() - 1); +// competition.setApplicantsNumber(competition.getApplicantsNumber() - 1); competitionService.updateById(competition); } if(paymentCompetition.getPayType() == 4){//课程支付 @@ -305,7 +307,7 @@ paymentCompetition.setAppUserId(null); this.updateById(paymentCompetition); - competition.setApplicantsNumber(competition.getApplicantsNumber() - 1); +// competition.setApplicantsNumber(competition.getApplicantsNumber() - 1); competitionService.updateById(competition); } return ResultUtil.success(); -- Gitblit v1.7.1