|
@@ -187,11 +187,15 @@ public class ChildrenDayReserveServiceImpl extends BaseServiceImpl<Integer, Chil
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ //获取课程的价格
|
|
|
+ OrganizationDegreeCourseFee courseFee = organizationDegreeCourseFeeDao.getByOrganId(degreePayDto.getOrganId());
|
|
|
+
|
|
|
//检查已经购买的课程(不能重复)
|
|
|
details = childrenDayDegreeDetailService.getByUserIdAndStatus(degreePayDto.getUserId(), 2);
|
|
|
Set<Integer> detailTypes = details.stream().map(ChildrenDayDegreeDetail::getType).collect(Collectors.toSet());
|
|
|
|
|
|
- if (degreePayDto.getTheoryLevel() != null && degreePayDto.getTheoryLevel() > 0 && !degreePayDto.getTheoryCourse() && !detailTypes.contains(5)) {
|
|
|
+ if (degreePayDto.getTheoryLevel() != null && degreePayDto.getTheoryLevel() > 0 &&
|
|
|
+ courseFee != null && !degreePayDto.getTheoryCourse() && !detailTypes.contains(5)) {
|
|
|
throw new BizException("参加乐理考试,请选乐理考级专项训练课");
|
|
|
}
|
|
|
|
|
@@ -238,13 +242,6 @@ public class ChildrenDayReserveServiceImpl extends BaseServiceImpl<Integer, Chil
|
|
|
}
|
|
|
degreePayDto.setReserveId(userReserve.getId());
|
|
|
|
|
|
- //获取课程的价格
|
|
|
- OrganizationDegreeCourseFee courseFee = organizationDegreeCourseFeeDao.getByOrganId(degreePayDto.getOrganId());
|
|
|
-
|
|
|
- if (courseFee == null) {
|
|
|
- throw new BizException("当前分部不参与,谢谢关注");
|
|
|
- }
|
|
|
-
|
|
|
List<DegreeLevelFee> degreeLevelFees = degreeLevelFeeDao.getAll();
|
|
|
|
|
|
//订单总金额
|