|  | @@ -1651,7 +1651,7 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
 | 
											
												
													
														|  |      @Transactional(rollbackFor = Exception.class)
 |  |      @Transactional(rollbackFor = Exception.class)
 | 
											
												
													
														|  |      public void batchAppendVipGroupCourses(VipGroupCourseAdjustInfoDto vipGroupCourseAdjustInfo) {
 |  |      public void batchAppendVipGroupCourses(VipGroupCourseAdjustInfoDto vipGroupCourseAdjustInfo) {
 | 
											
												
													
														|  |          if (Objects.isNull(vipGroupCourseAdjustInfo.getVipGroupId())) {
 |  |          if (Objects.isNull(vipGroupCourseAdjustInfo.getVipGroupId())) {
 | 
											
												
													
														|  | -            throw new BizException("请指定课程");
 |  | 
 | 
											
												
													
														|  | 
 |  | +            throw new BizException("请指定小课");
 | 
											
												
													
														|  |          }
 |  |          }
 | 
											
												
													
														|  |          if (Objects.isNull(vipGroupCourseAdjustInfo.getCourseCreateStartTime())) {
 |  |          if (Objects.isNull(vipGroupCourseAdjustInfo.getCourseCreateStartTime())) {
 | 
											
												
													
														|  |              throw new BizException("请指定排课起始时间;");
 |  |              throw new BizException("请指定排课起始时间;");
 | 
											
										
											
												
													
														|  | @@ -1672,32 +1672,17 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
 | 
											
												
													
														|  |          if (courseCreateStartTime.before(today)) {
 |  |          if (courseCreateStartTime.before(today)) {
 | 
											
												
													
														|  |              throw new BizException("排课起始时间不能小于当前时间");
 |  |              throw new BizException("排课起始时间不能小于当前时间");
 | 
											
												
													
														|  |          }
 |  |          }
 | 
											
												
													
														|  | -        int singleClassMinutes = 0;
 |  | 
 | 
											
												
													
														|  | -        Integer schoolId = null;
 |  | 
 | 
											
												
													
														|  | -        String groupId;
 |  | 
 | 
											
												
													
														|  | -        switch (vipGroupCourseAdjustInfo.getGroupType()){
 |  | 
 | 
											
												
													
														|  | -            case PRACTICE:
 |  | 
 | 
											
												
													
														|  | -                PracticeGroup practiceGroup = practiceGroupDao.get(vipGroupCourseAdjustInfo.getVipGroupId().longValue());
 |  | 
 | 
											
												
													
														|  | -                if (Objects.isNull(practiceGroup)) {
 |  | 
 | 
											
												
													
														|  | -                    throw new BizException("指定课程不存在");
 |  | 
 | 
											
												
													
														|  | -                }
 |  | 
 | 
											
												
													
														|  | -                singleClassMinutes = practiceGroup.getSingleClassMinutes();
 |  | 
 | 
											
												
													
														|  | -                groupId = practiceGroup.getId().toString();
 |  | 
 | 
											
												
													
														|  | -                break;
 |  | 
 | 
											
												
													
														|  | -            default:
 |  | 
 | 
											
												
													
														|  | -                VipGroup vipGroup = vipGroupDao.get(vipGroupCourseAdjustInfo.getVipGroupId().longValue());
 |  | 
 | 
											
												
													
														|  | -                if (Objects.isNull(vipGroup)) {
 |  | 
 | 
											
												
													
														|  | -                    throw new BizException("指定课程不存在");
 |  | 
 | 
											
												
													
														|  | -                }
 |  | 
 | 
											
												
													
														|  | -                schoolId = vipGroup.getTeacherSchoolId();
 |  | 
 | 
											
												
													
														|  | -                groupId = vipGroup.getId().toString();
 |  | 
 | 
											
												
													
														|  | -                singleClassMinutes = vipGroup.getSingleClassMinutes();
 |  | 
 | 
											
												
													
														|  | -                if (vipGroup.getStatus().equals(VipGroupStatusEnum.APPLYING)) {
 |  | 
 | 
											
												
													
														|  | -                    throw new BizException("报名中的课程不能加课");
 |  | 
 | 
											
												
													
														|  | -                }
 |  | 
 | 
											
												
													
														|  | 
 |  | +
 | 
											
												
													
														|  | 
 |  | +        VipGroup vipGroup = vipGroupDao.get(vipGroupCourseAdjustInfo.getVipGroupId().longValue());
 | 
											
												
													
														|  | 
 |  | +        if (Objects.isNull(vipGroup)) {
 | 
											
												
													
														|  | 
 |  | +            throw new BizException("指定课程不存在");
 | 
											
												
													
														|  |          }
 |  |          }
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  | -        ClassGroup classGroup = classGroupDao.findByGroupAndType(vipGroupCourseAdjustInfo.getVipGroupId().toString(), vipGroupCourseAdjustInfo.getGroupType().getCode());
 |  | 
 | 
											
												
													
														|  | 
 |  | +        if (vipGroup.getStatus().equals(VipGroupStatusEnum.APPLYING)) {
 | 
											
												
													
														|  | 
 |  | +            throw new BizException("报名中的课程不能加课");
 | 
											
												
													
														|  | 
 |  | +        }
 | 
											
												
													
														|  | 
 |  | +
 | 
											
												
													
														|  | 
 |  | +        ClassGroup classGroup = classGroupDao.findByGroupAndType(vipGroupCourseAdjustInfo.getVipGroupId().toString(), GroupType.VIP.getCode());
 | 
											
												
													
														|  |          if (Objects.isNull(classGroup)) {
 |  |          if (Objects.isNull(classGroup)) {
 | 
											
												
													
														|  |              throw new BizException("对应班级不存在");
 |  |              throw new BizException("对应班级不存在");
 | 
											
												
													
														|  |          }
 |  |          }
 | 
											
										
											
												
													
														|  | @@ -1746,15 +1731,15 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
 | 
											
												
													
														|  |                      String dateYmdStr = DateUtil.dateToString(calendar.getTime(), DateUtil.ISO_EXPANDED_DATE_FORMAT);
 |  |                      String dateYmdStr = DateUtil.dateToString(calendar.getTime(), DateUtil.ISO_EXPANDED_DATE_FORMAT);
 | 
											
												
													
														|  |                      dateYmdStr = dateYmdStr + " " + courseTime.getStartClassTime();
 |  |                      dateYmdStr = dateYmdStr + " " + courseTime.getStartClassTime();
 | 
											
												
													
														|  |                      Date courseStartTime = DateUtil.stringToDate(dateYmdStr, "yyyy-MM-dd HH:mm");
 |  |                      Date courseStartTime = DateUtil.stringToDate(dateYmdStr, "yyyy-MM-dd HH:mm");
 | 
											
												
													
														|  | -                    Date courseEndTime = DateUtil.addMinutes(courseStartTime, singleClassMinutes);
 |  | 
 | 
											
												
													
														|  | 
 |  | +                    Date courseEndTime = DateUtil.addMinutes(courseStartTime, vipGroup.getSingleClassMinutes());
 | 
											
												
													
														|  |                      CourseSchedule courseSchedule = new CourseSchedule();
 |  |                      CourseSchedule courseSchedule = new CourseSchedule();
 | 
											
												
													
														|  |                      courseSchedule.setGroupType(GroupType.VIP);
 |  |                      courseSchedule.setGroupType(GroupType.VIP);
 | 
											
												
													
														|  | -                    courseSchedule.setMusicGroupId(groupId);
 |  | 
 | 
											
												
													
														|  | 
 |  | +                    courseSchedule.setMusicGroupId(vipGroup.getId().toString());
 | 
											
												
													
														|  |                      courseSchedule.setClassGroupId(classGroup.getId());
 |  |                      courseSchedule.setClassGroupId(classGroup.getId());
 | 
											
												
													
														|  |                      courseSchedule.setClassDate(courseStartTime);
 |  |                      courseSchedule.setClassDate(courseStartTime);
 | 
											
												
													
														|  |                      courseSchedule.setStartClassTime(courseStartTime);
 |  |                      courseSchedule.setStartClassTime(courseStartTime);
 | 
											
												
													
														|  |                      courseSchedule.setEndClassTime(courseEndTime);
 |  |                      courseSchedule.setEndClassTime(courseEndTime);
 | 
											
												
													
														|  | -                    courseSchedule.setSchoolId(schoolId);
 |  | 
 | 
											
												
													
														|  | 
 |  | +                    courseSchedule.setSchoolId(vipGroup.getTeacherSchoolId());
 | 
											
												
													
														|  |                      courseSchedule.setStatus(CourseStatusEnum.NOT_START);
 |  |                      courseSchedule.setStatus(CourseStatusEnum.NOT_START);
 | 
											
												
													
														|  |                      courseSchedule.setTeachMode(vipGroupCourseAdjustInfo.getTeachMode());
 |  |                      courseSchedule.setTeachMode(vipGroupCourseAdjustInfo.getTeachMode());
 | 
											
												
													
														|  |                      courseSchedules.add(courseSchedule);
 |  |                      courseSchedules.add(courseSchedule);
 | 
											
										
											
												
													
														|  | @@ -1772,7 +1757,7 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
 | 
											
												
													
														|  |  //		courseScheduleDao.batchUpdate(courseSchedules);
 |  |  //		courseScheduleDao.batchUpdate(courseSchedules);
 | 
											
												
													
														|  |          VipGroupApplyDto vipGroupApplyDto = new VipGroupApplyDto();
 |  |          VipGroupApplyDto vipGroupApplyDto = new VipGroupApplyDto();
 | 
											
												
													
														|  |          VipGroupApplyBaseInfoDto vipGroupApplyBaseInfoDto = new VipGroupApplyBaseInfoDto();
 |  |          VipGroupApplyBaseInfoDto vipGroupApplyBaseInfoDto = new VipGroupApplyBaseInfoDto();
 | 
											
												
													
														|  | -        vipGroupApplyBaseInfoDto.setId(Long.parseLong(groupId));
 |  | 
 | 
											
												
													
														|  | 
 |  | +        vipGroupApplyBaseInfoDto.setId(vipGroup.getId());
 | 
											
												
													
														|  |          vipGroupApplyDto.setVipGroupApplyBaseInfo(vipGroupApplyBaseInfoDto);
 |  |          vipGroupApplyDto.setVipGroupApplyBaseInfo(vipGroupApplyBaseInfoDto);
 | 
											
												
													
														|  |          vipGroupApplyDto.setCourseSchedules(courseSchedules);
 |  |          vipGroupApplyDto.setCourseSchedules(courseSchedules);
 | 
											
												
													
														|  |          vipGroupApplyDto.setSingleClassPrice(vipGroupCourseAdjustInfo.getSingleClassPrice());
 |  |          vipGroupApplyDto.setSingleClassPrice(vipGroupCourseAdjustInfo.getSingleClassPrice());
 |