|
@@ -300,8 +300,8 @@ public class StudentRegistrationServiceImpl extends BaseServiceImpl<Long, Studen
|
|
}
|
|
}
|
|
|
|
|
|
@Override
|
|
@Override
|
|
- @Transactional
|
|
|
|
- public StudentPaymentOrder addOrder(StudentRegistration studentRegistration, BigDecimal amount, String orderNo, String paymentChannel, BigDecimal courseFee, List<MusicGroupSubjectGoodsGroup> goodsGroups, List<Goods> goodsList, List<Goods> otherGoodsList, List<CourseFormDto> courseForms, BigDecimal remitFee, BigDecimal courseRemitFee) throws Exception {
|
|
|
|
|
|
+ @Transactional(rollbackFor = Exception.class)
|
|
|
|
+ public StudentPaymentOrder addOrder(StudentRegistration studentRegistration, BigDecimal amount, String orderNo, String paymentChannel, BigDecimal courseFee, List<MusicGroupSubjectGoodsGroup> goodsGroups, List<Goods> goodsList, List<Goods> otherGoodsList, List<CourseFormDto> courseForms, BigDecimal remitFee, BigDecimal courseRemitFee, List<MusicGroupPaymentCalenderCourseSettings> newCourses) throws Exception {
|
|
Date date = new Date();
|
|
Date date = new Date();
|
|
StudentPaymentOrder studentPaymentOrder = new StudentPaymentOrder();
|
|
StudentPaymentOrder studentPaymentOrder = new StudentPaymentOrder();
|
|
studentPaymentOrder.setUserId(studentRegistration.getUserId());
|
|
studentPaymentOrder.setUserId(studentRegistration.getUserId());
|
|
@@ -366,7 +366,6 @@ public class StudentRegistrationServiceImpl extends BaseServiceImpl<Long, Studen
|
|
}
|
|
}
|
|
//单独教谱
|
|
//单独教谱
|
|
if (otherGoodsList != null && otherGoodsList.size() > 0) {
|
|
if (otherGoodsList != null && otherGoodsList.size() > 0) {
|
|
-
|
|
|
|
for (Goods goods : otherGoodsList) {
|
|
for (Goods goods : otherGoodsList) {
|
|
StudentPaymentOrderDetail studentPaymentOrderDetail4otherGoods = new StudentPaymentOrderDetail();
|
|
StudentPaymentOrderDetail studentPaymentOrderDetail4otherGoods = new StudentPaymentOrderDetail();
|
|
studentPaymentOrderDetail4otherGoods.setType(OrderDetailTypeEnum.TEACHING);
|
|
studentPaymentOrderDetail4otherGoods.setType(OrderDetailTypeEnum.TEACHING);
|
|
@@ -381,20 +380,8 @@ public class StudentRegistrationServiceImpl extends BaseServiceImpl<Long, Studen
|
|
//可选课程
|
|
//可选课程
|
|
if (courseForms != null && courseForms.size() > 0) {
|
|
if (courseForms != null && courseForms.size() > 0) {
|
|
for (CourseFormDto courseForm : courseForms) {
|
|
for (CourseFormDto courseForm : courseForms) {
|
|
- OrderDetailTypeEnum courType = OrderDetailTypeEnum.MUSIC_COURSE;
|
|
|
|
- if (courseForm.getType().equals("soundInfo")) {
|
|
|
|
- courType = OrderDetailTypeEnum.MUSIC_COURSE;
|
|
|
|
- } else if (courseForm.getType().equals("allInfo")) {
|
|
|
|
- courType = OrderDetailTypeEnum.MIX_COURSE;
|
|
|
|
- } else if (courseForm.getType().equals("baseInfo")) {
|
|
|
|
- courType = OrderDetailTypeEnum.HIGH_ONLINE_COURSE;
|
|
|
|
- } else if (courseForm.getType().equals("holidayInfo")) {
|
|
|
|
- courType = OrderDetailTypeEnum.HOLIDAY_COURSE;
|
|
|
|
- } else if (courseForm.getType().equals("networkInfo")) {
|
|
|
|
- courType = OrderDetailTypeEnum.NETWORK_COURSE;
|
|
|
|
- }
|
|
|
|
StudentPaymentOrderDetail studentPaymentOrderDetailCourse = new StudentPaymentOrderDetail();
|
|
StudentPaymentOrderDetail studentPaymentOrderDetailCourse = new StudentPaymentOrderDetail();
|
|
- studentPaymentOrderDetailCourse.setType(courType);
|
|
|
|
|
|
+ studentPaymentOrderDetailCourse.setType(OrderDetailTypeEnum.HIGH_ONLINE_COURSE);
|
|
studentPaymentOrderDetailCourse.setPrice(courseForm.getPrice());
|
|
studentPaymentOrderDetailCourse.setPrice(courseForm.getPrice());
|
|
studentPaymentOrderDetailCourse.setCreateTime(date);
|
|
studentPaymentOrderDetailCourse.setCreateTime(date);
|
|
studentPaymentOrderDetailCourse.setUpdateTime(date);
|
|
studentPaymentOrderDetailCourse.setUpdateTime(date);
|
|
@@ -402,7 +389,18 @@ public class StudentRegistrationServiceImpl extends BaseServiceImpl<Long, Studen
|
|
studentPaymentOrderDetailList.add(studentPaymentOrderDetailCourse);
|
|
studentPaymentOrderDetailList.add(studentPaymentOrderDetailCourse);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+ //新的课程形态
|
|
|
|
+ if (newCourses != null && newCourses.size() > 0) {
|
|
|
|
+ for (MusicGroupPaymentCalenderCourseSettings newCourse : newCourses) {
|
|
|
|
+ StudentPaymentOrderDetail studentPaymentOrderDetailCourse = new StudentPaymentOrderDetail();
|
|
|
|
+ studentPaymentOrderDetailCourse.setType(OrderDetailTypeEnum.valueOf(newCourse.getCourseType().getCode()));
|
|
|
|
+ studentPaymentOrderDetailCourse.setPrice(newCourse.getCourseCurrentPrice());
|
|
|
|
+ studentPaymentOrderDetailCourse.setCreateTime(date);
|
|
|
|
+ studentPaymentOrderDetailCourse.setUpdateTime(date);
|
|
|
|
+ studentPaymentOrderDetailCourse.setPaymentOrderId(studentPaymentOrder.getId());
|
|
|
|
+ studentPaymentOrderDetailList.add(studentPaymentOrderDetailCourse);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
studentPaymentOrderDetailService.batchAdd(studentPaymentOrderDetailList);
|
|
studentPaymentOrderDetailService.batchAdd(studentPaymentOrderDetailList);
|
|
|
|
|
|
//增加缴费学生数
|
|
//增加缴费学生数
|
|
@@ -432,8 +430,8 @@ public class StudentRegistrationServiceImpl extends BaseServiceImpl<Long, Studen
|
|
}
|
|
}
|
|
|
|
|
|
@Override
|
|
@Override
|
|
- @Transactional
|
|
|
|
- public StudentPaymentOrder reAddOrder(Integer userId, BigDecimal amount, String orderNo, String paymentChannel, BigDecimal courseFee, List<MusicGroupSubjectGoodsGroup> goodsGroups, List<Goods> goodsList, List<Goods> otherGoodsList, String musicGroupId, StudentPaymentOrder oldOrder, List<CourseFormDto> courseForms, BigDecimal remitFee, BigDecimal courseRemitFee) {
|
|
|
|
|
|
+ @Transactional(rollbackFor = Exception.class)
|
|
|
|
+ public StudentPaymentOrder reAddOrder(Integer userId, BigDecimal amount, String orderNo, String paymentChannel, BigDecimal courseFee, List<MusicGroupSubjectGoodsGroup> goodsGroups, List<Goods> goodsList, List<Goods> otherGoodsList, String musicGroupId, StudentPaymentOrder oldOrder, List<CourseFormDto> courseForms, BigDecimal remitFee, BigDecimal courseRemitFee,List<MusicGroupPaymentCalenderCourseSettings> newCourses) {
|
|
//关闭老订单
|
|
//关闭老订单
|
|
oldOrder.setStatus(DealStatusEnum.CLOSE);
|
|
oldOrder.setStatus(DealStatusEnum.CLOSE);
|
|
studentPaymentOrderService.update(oldOrder);
|
|
studentPaymentOrderService.update(oldOrder);
|
|
@@ -519,20 +517,8 @@ public class StudentRegistrationServiceImpl extends BaseServiceImpl<Long, Studen
|
|
//可选课程
|
|
//可选课程
|
|
if (courseForms != null && courseForms.size() > 0) {
|
|
if (courseForms != null && courseForms.size() > 0) {
|
|
for (CourseFormDto courseForm : courseForms) {
|
|
for (CourseFormDto courseForm : courseForms) {
|
|
- OrderDetailTypeEnum courType = OrderDetailTypeEnum.MUSIC_COURSE;
|
|
|
|
- if (courseForm.getType().equals("soundInfo")) {
|
|
|
|
- courType = OrderDetailTypeEnum.MUSIC_COURSE;
|
|
|
|
- } else if (courseForm.getType().equals("allInfo")) {
|
|
|
|
- courType = OrderDetailTypeEnum.MIX_COURSE;
|
|
|
|
- } else if (courseForm.getType().equals("baseInfo")) {
|
|
|
|
- courType = OrderDetailTypeEnum.HIGH_ONLINE_COURSE;
|
|
|
|
- } else if (courseForm.getType().equals("holidayInfo")) {
|
|
|
|
- courType = OrderDetailTypeEnum.HOLIDAY_COURSE;
|
|
|
|
- } else if (courseForm.getType().equals("networkInfo")) {
|
|
|
|
- courType = OrderDetailTypeEnum.NETWORK_COURSE;
|
|
|
|
- }
|
|
|
|
StudentPaymentOrderDetail studentPaymentOrderDetailCourse = new StudentPaymentOrderDetail();
|
|
StudentPaymentOrderDetail studentPaymentOrderDetailCourse = new StudentPaymentOrderDetail();
|
|
- studentPaymentOrderDetailCourse.setType(courType);
|
|
|
|
|
|
+ studentPaymentOrderDetailCourse.setType(OrderDetailTypeEnum.HIGH_ONLINE_COURSE);
|
|
studentPaymentOrderDetailCourse.setPrice(courseForm.getPrice());
|
|
studentPaymentOrderDetailCourse.setPrice(courseForm.getPrice());
|
|
studentPaymentOrderDetailCourse.setCreateTime(date);
|
|
studentPaymentOrderDetailCourse.setCreateTime(date);
|
|
studentPaymentOrderDetailCourse.setUpdateTime(date);
|
|
studentPaymentOrderDetailCourse.setUpdateTime(date);
|
|
@@ -540,6 +526,18 @@ public class StudentRegistrationServiceImpl extends BaseServiceImpl<Long, Studen
|
|
studentPaymentOrderDetailList.add(studentPaymentOrderDetailCourse);
|
|
studentPaymentOrderDetailList.add(studentPaymentOrderDetailCourse);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+ //新的课程形态
|
|
|
|
+ if (newCourses != null && newCourses.size() > 0) {
|
|
|
|
+ for (MusicGroupPaymentCalenderCourseSettings newCourse : newCourses) {
|
|
|
|
+ StudentPaymentOrderDetail studentPaymentOrderDetailCourse = new StudentPaymentOrderDetail();
|
|
|
|
+ studentPaymentOrderDetailCourse.setType(OrderDetailTypeEnum.valueOf(newCourse.getCourseType().getCode()));
|
|
|
|
+ studentPaymentOrderDetailCourse.setPrice(newCourse.getCourseCurrentPrice());
|
|
|
|
+ studentPaymentOrderDetailCourse.setCreateTime(date);
|
|
|
|
+ studentPaymentOrderDetailCourse.setUpdateTime(date);
|
|
|
|
+ studentPaymentOrderDetailCourse.setPaymentOrderId(studentPaymentOrder.getId());
|
|
|
|
+ studentPaymentOrderDetailList.add(studentPaymentOrderDetailCourse);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
studentPaymentOrderDetailService.batchAdd(studentPaymentOrderDetailList);
|
|
studentPaymentOrderDetailService.batchAdd(studentPaymentOrderDetailList);
|
|
|
|
|
|
return studentPaymentOrder;
|
|
return studentPaymentOrder;
|
|
@@ -1165,7 +1163,7 @@ public class StudentRegistrationServiceImpl extends BaseServiceImpl<Long, Studen
|
|
public StudentRegistration changeStudentSubject(Integer studentId, String musicGroupId, Integer originalSubjectId, Integer changeSubjectId) {
|
|
public StudentRegistration changeStudentSubject(Integer studentId, String musicGroupId, Integer originalSubjectId, Integer changeSubjectId) {
|
|
studentDao.lockUser(studentId);
|
|
studentDao.lockUser(studentId);
|
|
//1、更换学生的声部
|
|
//1、更换学生的声部
|
|
- StudentRegistration studentRegistration = studentRegistrationDao.getStudentRegister(musicGroupId,studentId);
|
|
|
|
|
|
+ StudentRegistration studentRegistration = studentRegistrationDao.getStudentRegister(musicGroupId, studentId);
|
|
studentRegistration.setActualSubjectId(changeSubjectId);
|
|
studentRegistration.setActualSubjectId(changeSubjectId);
|
|
studentRegistrationDao.update(studentRegistration);
|
|
studentRegistrationDao.update(studentRegistration);
|
|
|
|
|