|
@@ -253,7 +253,7 @@ public class StudentRegistrationServiceImpl extends BaseServiceImpl<Long, Studen
|
|
|
studentPaymentOrderDetail.setPaymentOrderId(studentPaymentOrder.getId());
|
|
|
studentPaymentOrderDetailList.add(studentPaymentOrderDetail);
|
|
|
//乐器及打包辅件
|
|
|
- if (goodsGroups != null &&goodsGroups.size() >0) {
|
|
|
+ if (goodsGroups != null && goodsGroups.size() > 0) {
|
|
|
for (MusicGroupSubjectGoodsGroup goodsGroup : goodsGroups) {
|
|
|
StudentPaymentOrderDetail studentPaymentOrderDetail4goodsGroup = new StudentPaymentOrderDetail();
|
|
|
OrderDetailTypeEnum type = null;
|
|
@@ -275,7 +275,7 @@ public class StudentRegistrationServiceImpl extends BaseServiceImpl<Long, Studen
|
|
|
}
|
|
|
|
|
|
//单独辅件
|
|
|
- if (goodsList != null) {
|
|
|
+ if (goodsList != null && goodsList.size() > 0) {
|
|
|
for (Goods goods : goodsList) {
|
|
|
StudentPaymentOrderDetail studentPaymentOrderDetail4goods = new StudentPaymentOrderDetail();
|
|
|
OrderDetailTypeEnum orderDetailType = goods.getType().equals(GoodsType.INSTRUMENT) ? OrderDetailTypeEnum.MUSICAL : OrderDetailTypeEnum.ACCESSORIES;
|
|
@@ -289,7 +289,7 @@ public class StudentRegistrationServiceImpl extends BaseServiceImpl<Long, Studen
|
|
|
}
|
|
|
}
|
|
|
//单独教谱
|
|
|
- if (otherGoodsList != null) {
|
|
|
+ if (otherGoodsList != null && otherGoodsList.size() > 0) {
|
|
|
for (Goods goods : otherGoodsList) {
|
|
|
StudentPaymentOrderDetail studentPaymentOrderDetail4otherGoods = new StudentPaymentOrderDetail();
|
|
|
studentPaymentOrderDetail4otherGoods.setType(OrderDetailTypeEnum.TEACHING);
|
|
@@ -343,7 +343,7 @@ public class StudentRegistrationServiceImpl extends BaseServiceImpl<Long, Studen
|
|
|
studentPaymentOrderDetail.setPaymentOrderId(studentPaymentOrder.getId());
|
|
|
studentPaymentOrderDetailList.add(studentPaymentOrderDetail);
|
|
|
//乐器及打包辅件
|
|
|
- if (goodsGroups != null &&goodsGroups.size() >0) {
|
|
|
+ if (goodsGroups != null && goodsGroups.size() > 0) {
|
|
|
for (MusicGroupSubjectGoodsGroup goodsGroup : goodsGroups) {
|
|
|
StudentPaymentOrderDetail studentPaymentOrderDetail4goodsGroup = new StudentPaymentOrderDetail();
|
|
|
OrderDetailTypeEnum type = null;
|
|
@@ -365,7 +365,7 @@ public class StudentRegistrationServiceImpl extends BaseServiceImpl<Long, Studen
|
|
|
}
|
|
|
|
|
|
//单独辅件
|
|
|
- if (goodsList != null) {
|
|
|
+ if (goodsList != null && goodsList.size() > 0) {
|
|
|
for (Goods goods : goodsList) {
|
|
|
StudentPaymentOrderDetail studentPaymentOrderDetail4goods = new StudentPaymentOrderDetail();
|
|
|
OrderDetailTypeEnum orderDetailType = goods.getType().equals(GoodsType.INSTRUMENT) ? OrderDetailTypeEnum.MUSICAL : OrderDetailTypeEnum.ACCESSORIES;
|
|
@@ -380,7 +380,7 @@ public class StudentRegistrationServiceImpl extends BaseServiceImpl<Long, Studen
|
|
|
}
|
|
|
}
|
|
|
//单独教谱
|
|
|
- if (otherGoodsList != null) {
|
|
|
+ if (otherGoodsList != null && otherGoodsList.size() > 0) {
|
|
|
for (Goods goods : otherGoodsList) {
|
|
|
StudentPaymentOrderDetail studentPaymentOrderDetail4otherGoods = new StudentPaymentOrderDetail();
|
|
|
studentPaymentOrderDetail4otherGoods.setType(OrderDetailTypeEnum.TEACHING);
|
|
@@ -513,7 +513,7 @@ public class StudentRegistrationServiceImpl extends BaseServiceImpl<Long, Studen
|
|
|
studentPaymentOrderService.insert(studentPaymentOrder);
|
|
|
//生成订单明细
|
|
|
List<StudentPaymentOrderDetail> studentPaymentOrderDetails = studentAddDto.getStudentPaymentOrderDetails();
|
|
|
- if(studentPaymentOrderDetails != null && studentPaymentOrderDetails.size() > 0){
|
|
|
+ if (studentPaymentOrderDetails != null && studentPaymentOrderDetails.size() > 0) {
|
|
|
studentPaymentOrderDetails.forEach(e -> {
|
|
|
e.setPaymentOrderId(studentPaymentOrder.getId());
|
|
|
});
|
|
@@ -558,7 +558,7 @@ public class StudentRegistrationServiceImpl extends BaseServiceImpl<Long, Studen
|
|
|
waitPayOrder.setStatus(DealStatusEnum.CLOSE);
|
|
|
studentPaymentOrderService.update(waitPayOrder);
|
|
|
//添加学生
|
|
|
- classGroupStudentMapperService.addStudents(studentRegistration.getClassGroupId(),studentRegistration.getUserId().toString(),GroupType.MUSIC);
|
|
|
+ classGroupStudentMapperService.addStudents(studentRegistration.getClassGroupId(), studentRegistration.getUserId().toString(), GroupType.MUSIC);
|
|
|
}
|
|
|
|
|
|
if (studentRegistration.getTemporaryCourseFee() == null) {
|
|
@@ -736,7 +736,7 @@ public class StudentRegistrationServiceImpl extends BaseServiceImpl<Long, Studen
|
|
|
update(student);
|
|
|
studentRegistrationDao.updateUser(student.getUserId(), student.getParentsName(), student.getIdCardNo());
|
|
|
// 添加用户电子签章账户
|
|
|
- contractService.register(student.getUserId(),student.getParentsName(), student.getIdCardNo(), student.getParentsPhone());
|
|
|
+ contractService.register(student.getUserId(), student.getParentsName(), student.getIdCardNo(), student.getParentsPhone());
|
|
|
return student;
|
|
|
}
|
|
|
}
|