Browse Source

乐团缴费不用登陆

周箭河 5 years ago
parent
commit
75f1a9e3c6

+ 10 - 4
mec-biz/src/main/java/com/ym/mec/biz/service/impl/StudentRegistrationServiceImpl.java

@@ -471,10 +471,10 @@ public class StudentRegistrationServiceImpl extends BaseServiceImpl<Long, Studen
                     throw new Exception("班级不存在");
                 }
                 //新增班级学生关系(单技班)
-                classGroupStudentMapperDao.insert(new ClassGroupStudentMapper(classGroupId, userId));
-                //新增班级学生关系(合奏班)
-                ClassGroupRelation classGroupRelation = classGroupRelationDao.findClassGroupRelation(classGroupId);
-                classGroupStudentMapperDao.insert(new ClassGroupStudentMapper(classGroupRelation.getClassGroupId(), userId));
+//                classGroupStudentMapperDao.insert(new ClassGroupStudentMapper(classGroupId, userId));
+//                //新增班级学生关系(合奏班)
+//                ClassGroupRelation classGroupRelation = classGroupRelationDao.findClassGroupRelation(classGroupId);
+//                classGroupStudentMapperDao.insert(new ClassGroupStudentMapper(classGroupRelation.getClassGroupId(), userId));
 
                 //获取当前月
                 Integer month = Integer.parseInt(DateUtil.getMonth(new Date()));
@@ -544,6 +544,12 @@ public class StudentRegistrationServiceImpl extends BaseServiceImpl<Long, Studen
         MusicGroupSubjectPlan musicOneSubjectClassPlan = musicGroupSubjectPlanService.getMusicOneSubjectClassPlan(studentRegistration.getMusicGroupId(), studentRegistration.getSubjectId());
 
         if (studentPaymentOrder.getStatus().equals(DealStatusEnum.SUCCESS)) {
+            if (studentRegistration.getTemporaryCourseFee() != null) {
+                //关闭订单
+                StudentPaymentOrder waitPayOrder = studentPaymentOrderService.findMusicGroupApplyOrderByStatus(studentRegistration.getUserId(), studentRegistration.getMusicGroupId(), DealStatusEnum.WAIT_PAY);
+                waitPayOrder.setStatus(DealStatusEnum.CLOSE);
+                studentPaymentOrderService.update(waitPayOrder);
+            }
 
             if (studentRegistration.getTemporaryCourseFee() == null) {
                 //获取当前月