|
@@ -382,7 +382,8 @@ public class StudentRegistrationServiceImpl extends BaseServiceImpl<Long, Studen
|
|
|
|
|
|
@Override
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
|
- public StudentPaymentOrder addOrder(StudentRegistration studentRegistration, BigDecimal amount, String orderNo, String paymentChannel, BigDecimal courseFee, List<MusicGroupSubjectGoodsGroup> goodsGroups, BigDecimal remitFee, BigDecimal courseRemitFee, List<MusicGroupPaymentCalenderCourseSettings> newCourses) throws Exception {
|
|
|
+ public StudentPaymentOrder addOrder(StudentRegistration studentRegistration, BigDecimal amount, String orderNo, String paymentChannel,
|
|
|
+ BigDecimal courseFee, List<MusicGroupSubjectGoodsGroup> goodsGroups, BigDecimal remitFee, BigDecimal courseRemitFee, List<MusicGroupPaymentCalenderCourseSettings> newCourses,Boolean buyMaintenance) throws Exception {
|
|
|
Date date = new Date();
|
|
|
StudentPaymentOrder studentPaymentOrder = new StudentPaymentOrder();
|
|
|
studentPaymentOrder.setUserId(studentRegistration.getUserId());
|
|
@@ -450,6 +451,16 @@ public class StudentRegistrationServiceImpl extends BaseServiceImpl<Long, Studen
|
|
|
studentPaymentOrderDetailList.add(studentPaymentOrderDetailCourse);
|
|
|
}
|
|
|
}
|
|
|
+ if(buyMaintenance){
|
|
|
+ StudentPaymentOrderDetail maintenanceOrderDetail = new StudentPaymentOrderDetail();
|
|
|
+ maintenanceOrderDetail.setType(OrderDetailTypeEnum.MAINTENANCE);
|
|
|
+ maintenanceOrderDetail.setPrice(BigDecimal.ZERO);
|
|
|
+ maintenanceOrderDetail.setRemitFee(BigDecimal.ZERO);
|
|
|
+ maintenanceOrderDetail.setCreateTime(date);
|
|
|
+ maintenanceOrderDetail.setUpdateTime(date);
|
|
|
+ maintenanceOrderDetail.setPaymentOrderId(studentPaymentOrder.getId());
|
|
|
+ studentPaymentOrderDetailList.add(maintenanceOrderDetail);
|
|
|
+ }
|
|
|
studentPaymentOrderDetailService.batchAdd(studentPaymentOrderDetailList);
|
|
|
|
|
|
//增加缴费学生数
|