|
|
@@ -2423,14 +2423,14 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
|
|
|
throw new BizException("您无法购买此课程");
|
|
|
}
|
|
|
}
|
|
|
- ClassGroup classGroup = classGroupDao.findByGroupAndType(vipGroupId.toString(), "PRACTICE");
|
|
|
-
|
|
|
- if(classGroup.getStudentNum()>0 && (VipGroupStatusEnum.APPLYING.equals(practiceGroup.getGroupStatus()))){
|
|
|
- int i = studentPaymentOrderDao.countGroupOrderWithoutFailed(vipGroupId.toString(), GroupType.PRACTICE);
|
|
|
- if(i<=0){
|
|
|
- throw new BizException("该课程已经无法通过购买加入,请联系教务老师!");
|
|
|
- }
|
|
|
- }
|
|
|
+// ClassGroup classGroup = classGroupDao.findByGroupAndType(vipGroupId.toString(), "PRACTICE");
|
|
|
+//
|
|
|
+// if(classGroup.getStudentNum()>0 && (VipGroupStatusEnum.APPLYING.equals(practiceGroup.getGroupStatus()))){
|
|
|
+// int i = studentPaymentOrderDao.countGroupOrderWithoutFailed(vipGroupId.toString(), GroupType.PRACTICE);
|
|
|
+// if(i<=0){
|
|
|
+// throw new BizException("该课程已经无法通过购买加入,请联系教务老师!");
|
|
|
+// }
|
|
|
+// }
|
|
|
|
|
|
List<CourseSchedule> courseSchedules = JSON.parseArray(practiceGroup.getCourseScheduleJson(),CourseSchedule.class);
|
|
|
courseScheduleService.checkNewCourseSchedules(courseSchedules,false,false);
|
|
|
@@ -2443,14 +2443,14 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- ClassGroup classGroup = classGroupDao.findByVipGroup(vipGroupId.longValue(), null);
|
|
|
-
|
|
|
- if(classGroup.getStudentNum()>0&&(VipGroupStatusEnum.APPLYING.equals(vipGroup.getStatus()))){
|
|
|
- int i = studentPaymentOrderDao.countGroupOrderWithoutFailed(vipGroupId.toString(), GroupType.VIP);
|
|
|
- if(i<=0){
|
|
|
- throw new BizException("该课程已经无法通过购买加入,请联系教务老师!");
|
|
|
- }
|
|
|
- }
|
|
|
+// ClassGroup classGroup = classGroupDao.findByVipGroup(vipGroupId.longValue(), null);
|
|
|
+//
|
|
|
+// if(classGroup.getStudentNum() > 0 && (VipGroupStatusEnum.APPLYING.equals(vipGroup.getStatus()))){
|
|
|
+// int i = studentPaymentOrderDao.countGroupOrderWithoutFailed(vipGroupId.toString(), GroupType.VIP);
|
|
|
+// if(i <= 0){
|
|
|
+// throw new BizException("该课程已经无法通过购买加入,请联系教务老师!");
|
|
|
+// }
|
|
|
+// }
|
|
|
|
|
|
List<CourseSchedule> courseSchedules = JSON.parseArray(vipGroup.getCourseSchedulesJson(),CourseSchedule.class);
|
|
|
courseScheduleService.checkNewCourseSchedules(courseSchedules,false,false);
|
|
|
@@ -2769,6 +2769,8 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
|
|
|
courseScheduleService.checkNewCourseSchedules(courseSchedules, false,false);
|
|
|
courseScheduleService.batchAddCourseSchedule(courseSchedules);
|
|
|
|
|
|
+ //考勤信息
|
|
|
+ List<TeacherAttendance> teacherAttendances = new ArrayList<>();
|
|
|
//创建课酬信息
|
|
|
List<CourseScheduleTeacherSalary> courseScheduleTeacherSalaries = new ArrayList<>();
|
|
|
ClassGroupTeacherSalary classGroupTeacherSalary = classGroupTeacherSalaryDao.findByVipGoupAndTeacher(vipGroup.getId().intValue(), vipGroup.getUserId());
|
|
|
@@ -2784,6 +2786,14 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
|
|
|
courseScheduleTeacherSalary.setExpectSalary(classGroupTeacherSalary.getSalary());
|
|
|
courseScheduleTeacherSalary.setActualSalary(null);
|
|
|
courseScheduleTeacherSalaries.add(courseScheduleTeacherSalary);
|
|
|
+
|
|
|
+ TeacherAttendance teacherAttendance = new TeacherAttendance();
|
|
|
+ teacherAttendance.setGroupType(courseSchedule.getGroupType());
|
|
|
+ teacherAttendance.setClassGroupId(courseSchedule.getClassGroupId());
|
|
|
+ teacherAttendance.setMusicGroupId(courseSchedule.getMusicGroupId());
|
|
|
+ teacherAttendance.setTeacherId(courseSchedule.getActualTeacherId());
|
|
|
+ teacherAttendance.setCourseScheduleId(courseSchedule.getId());
|
|
|
+ teacherAttendances.add(teacherAttendance);
|
|
|
}
|
|
|
//群聊数据
|
|
|
Map<Integer,String> userRoleMap = new HashMap<Integer, String>(5);
|
|
|
@@ -2822,7 +2832,11 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
|
|
|
userRoleMap.put(classGroupStudent.getUserId(),null);
|
|
|
}
|
|
|
studentDao.updateStudentServiceTag(null, studentIdList, YesOrNoEnum.YES.getCode());
|
|
|
+
|
|
|
+ courseScheduleStudentPaymentDao.batchInsert(courseScheduleStudentPayments);
|
|
|
courseScheduleTeacherSalaryDao.batchInsert(courseScheduleTeacherSalaries);
|
|
|
+ teacherAttendanceDao.batchInsert(teacherAttendances);
|
|
|
+
|
|
|
imGroupService.create(classGroup.getId().longValue(), null, classGroup.getName(), classGroup.getName(), vipGroup.getName(), null, null, GroupType.VIP.getCode());
|
|
|
imGroupMemberService.join(classGroup.getId().longValue(), userRoleMap);
|
|
|
imUserFriendService.refreshGroupImUserFriend(classGroup.getMusicGroupId(),classGroup.getGroupType());
|