|
@@ -712,29 +712,6 @@ public class StudentPaymentOrderDetailServiceImpl extends BaseServiceImpl<Long,
|
|
|
repair.setStudentInstrumentId(studentInstrumentId);
|
|
|
studentPaymentOrderDetailDao.update(repair);
|
|
|
}
|
|
|
- if(musicGroup.getCourseViewType() == CourseViewTypeEnum.FREE){
|
|
|
- //如果是免费团,那么要处理乐器溢出的课程费用
|
|
|
- CourseViewTypeEnum courseViewType = musicGroup.getCourseViewType();
|
|
|
- Integer subjectId = studentRegistration.getActualSubjectId();
|
|
|
- ChargeTypeSubjectMapper chargeType = chargeTypeSubjectMapperDao.findByViewTypeANdSubject(courseViewType,subjectId,musicGroup.getTenantId());
|
|
|
- if(Objects.nonNull(chargeType) && chargeType.getFee() != null && musical.getPrice().compareTo(BigDecimal.ZERO) > 0
|
|
|
- && chargeType.getFee().compareTo(musical.getPrice()) < 0){
|
|
|
- BigDecimal musicalFee = musical.getPrice().subtract(chargeType.getFee());
|
|
|
- studentMusicCourseFeeService.addExpectPrice(studentRegistration.getUserId(),
|
|
|
- musicGroup.getId(),musicalFee);
|
|
|
- //累加充值金额
|
|
|
- studentRegistration.setSurplusCourseFee(studentRegistration.getSurplusCourseFee().add(musicalFee));
|
|
|
- //添加日志
|
|
|
- StudentCourseFeeDetail studentCourseFeeDetail = new StudentCourseFeeDetail();
|
|
|
- studentCourseFeeDetail.setTenantId(tenantId);
|
|
|
- studentCourseFeeDetail.setStudentRegistrationId(studentRegistration.getId());
|
|
|
- studentCourseFeeDetail.setAmount(musicalFee);
|
|
|
- studentCourseFeeDetail.setSurplusCourseFee(studentRegistration.getSurplusCourseFee());
|
|
|
- studentCourseFeeDetail.setMemo("免费团,购买乐器赠送课费");
|
|
|
- studentCourseFeeDetail.setOperator(userId);
|
|
|
- studentCourseFeeDetailDao.insert(studentCourseFeeDetail);
|
|
|
- }
|
|
|
- }
|
|
|
}
|
|
|
|
|
|
//学生云教练处理
|