From 8e524f6e570fca66f670a8072edefc6ca2d4e2f9 Mon Sep 17 00:00:00 2001 From: 44323 <443237572@qq.com> Date: 星期三, 01 十一月 2023 08:55:02 +0800 Subject: [PATCH] Merge branch 'master' of http://120.76.84.145:10101/gitblit/r/java/PlayPai --- cloud-server-competition/src/main/java/com/dsh/competition/service/impl/CompetitionServiceImpl.java | 34 ++++++++++++++++++++++++---------- 1 files changed, 24 insertions(+), 10 deletions(-) diff --git a/cloud-server-competition/src/main/java/com/dsh/competition/service/impl/CompetitionServiceImpl.java b/cloud-server-competition/src/main/java/com/dsh/competition/service/impl/CompetitionServiceImpl.java index 0e35e4b..d8fa0ea 100644 --- a/cloud-server-competition/src/main/java/com/dsh/competition/service/impl/CompetitionServiceImpl.java +++ b/cloud-server-competition/src/main/java/com/dsh/competition/service/impl/CompetitionServiceImpl.java @@ -96,6 +96,10 @@ @Override public List<CompetitionListVo> queryCompetitionList(String cityCode, String content, Integer registerCondition, String heat) throws Exception { List<CompetitionListVo> competitionListVos = this.baseMapper.queryCompetitionList(cityCode, content, registerCondition, heat); + + + + return competitionListVos; } @@ -159,7 +163,17 @@ competitionInfo.setAge(competition.getStartAge() + "-" + competition.getEndAge()); competitionInfo.setProvince(competition.getEntryProvince()); competitionInfo.setCity(competition.getEntryCity()); - competitionInfo.setAddress(competition.getEntryAddress()); + String str = competition.getAddress(); + str = str.substring(str.indexOf("省") + 1); + + // 去掉第一个“市”及之前的字符串 + str = str.substring(str.indexOf("市") + 1); + + // 去掉第一个“区”及之前的字符串 + str = str.substring(str.indexOf("区") + 1); + + + competitionInfo.setAddress(str); competitionInfo.setCashPrice(competition.getCashPrice()); competitionInfo.setPlayPaiCoin(competition.getPlayPaiCoin()); competitionInfo.setClassPrice(competition.getClassPrice()); @@ -225,15 +239,15 @@ if(paymentCompetitionVo.getPayType() == 4){//课程 money = new BigDecimal(competition.getClassPrice()).multiply(new BigDecimal(split.length)).setScale(2, RoundingMode.HALF_EVEN); for (String s : split) { - Participant participant = participantService.getById(s); - Student student = studentClient.queryStudentByPhone(participant.getPhone()); - if(null == student){ - return ResultUtil.error(participant.getName() + "不是学员,无法使用课时支付。"); - } +// Participant participant = participantService.getById(s); +// Student student = studentClient.queryStudentByPhone(participant.getPhone()); +// if(null == student){ +// return ResultUtil.error(participant.getName() + "不是学员,无法使用课时支付。"); +// } // 2.0 Integer integer = coursePackagePaymentClient.queryResidueClassHourById(paymentCompetitionVo.getCoursePaymentId()); if(new BigDecimal(integer).compareTo(new BigDecimal(competition.getClassPrice())) < 0){ - return ResultUtil.error(participant.getName() + "剩余课时不足,无法完成支付。"); + return ResultUtil.error( "剩余课时不足,无法完成支付。"); } } } @@ -283,10 +297,10 @@ } if(paymentCompetitionVo.getPayType() == 4){//课程 for (String s : split) { - Participant participant = participantService.getById(s); - Student student = studentClient.queryStudentByPhone(participant.getPhone()); +// Participant participant = participantService.getById(s); +// Student student = studentClient.queryStudentByPhone(participant.getPhone()); PaymentDeductionClassHour paymentDeductionClassHour = new PaymentDeductionClassHour(); - paymentDeductionClassHour.setId(student.getId()); + paymentDeductionClassHour.setId(Integer.valueOf(s)); paymentDeductionClassHour.setClassHour(competition.getClassPrice()); paymentDeductionClassHour.setCode(code); paymentDeductionClassHour.setCourseId(paymentCompetitionVo.getCoursePaymentId()); -- Gitblit v1.7.1