|
@@ -922,8 +922,14 @@ public class StudentRegistrationServiceImpl extends BaseServiceImpl<Long, Studen
|
|
|
}
|
|
|
studentRegistration.setPaymentStatus(PaymentStatusEnum.YES);
|
|
|
studentRegistration.setMusicGroupStatus(StudentMusicGroupStatusEnum.NORMAL);
|
|
|
+
|
|
|
+ List<StudentPaymentOrderDetail> orderDetails = studentPaymentOrderDetailService.getOrderDetail(studentPaymentOrder.getId());
|
|
|
+
|
|
|
+ BigDecimal courseFee = orderDetails.stream().filter(o -> o.getType().getCode().equals("COURSE")).map(o -> o.getPrice().subtract(o.getRemitFee()))
|
|
|
+ .reduce(BigDecimal.ZERO, BigDecimal::add);
|
|
|
+
|
|
|
//累加充值金额
|
|
|
- studentRegistration.setSurplusCourseFee(studentRegistration.getSurplusCourseFee().add(studentPaymentOrder.getExpectAmount()));
|
|
|
+ studentRegistration.setSurplusCourseFee(studentRegistration.getSurplusCourseFee().add(courseFee));
|
|
|
studentRegistrationDao.update(studentRegistration);
|
|
|
|
|
|
//添加日志
|
|
@@ -987,7 +993,6 @@ public class StudentRegistrationServiceImpl extends BaseServiceImpl<Long, Studen
|
|
|
sysUserCashAccountDetailService.insert(paymentDetail);
|
|
|
|
|
|
//销售订单详情
|
|
|
- List<StudentPaymentOrderDetail> orderDetails = studentPaymentOrderDetailService.getOrderDetail(studentPaymentOrder.getId());
|
|
|
if (orderDetails.size() > 0) {
|
|
|
sellOrderService.addOrderDetail2SellOrder(orderDetails, studentPaymentOrder, musicGroup);
|
|
|
}
|