|  | @@ -4924,20 +4924,31 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  	@Override
 | 
	
		
			
				|  |  |  	@Transactional(rollbackFor = Exception.class)
 | 
	
		
			
				|  |  | -	public void updateCoursesExpireDate(String practiceGroupId, Date coursesExpireDate) {
 | 
	
		
			
				|  |  | +	public void updatePracticeGroupInDate(String practiceGroupId, Date courseStartDate, Date coursesExpireDate) {
 | 
	
		
			
				|  |  |  		SysUser user = sysUserFeignService.queryUserInfo();
 | 
	
		
			
				|  |  |  		if (null == user) {
 | 
	
		
			
				|  |  |  			throw new BizException("获取用户信息失败");
 | 
	
		
			
				|  |  |  		}
 | 
	
		
			
				|  |  | -    	if(practiceGroupId == null || coursesExpireDate == null ){
 | 
	
		
			
				|  |  | +    	if(practiceGroupId == null || courseStartDate == null || coursesExpireDate == null){
 | 
	
		
			
				|  |  |      		throw new BizException("参数校验失败");
 | 
	
		
			
				|  |  |  		}
 | 
	
		
			
				|  |  |  		PracticeGroup practiceGroup = practiceGroupDao.get(Long.parseLong(practiceGroupId));
 | 
	
		
			
				|  |  |      	if(practiceGroup == null){
 | 
	
		
			
				|  |  |  			throw new BizException("课程组不存在");
 | 
	
		
			
				|  |  |  		}
 | 
	
		
			
				|  |  | -		if(practiceGroup.getCoursesStartDate().after(coursesExpireDate)){
 | 
	
		
			
				|  |  | -			throw new BizException("课程有效时间不能早于开始时间");
 | 
	
		
			
				|  |  | +    	if(!GroupStatusEnum.NORMAL.equals(practiceGroup.getGroupStatus())){
 | 
	
		
			
				|  |  | +    		throw new BizException("非进行中课程组不可编辑");
 | 
	
		
			
				|  |  | +		}
 | 
	
		
			
				|  |  | +		if(courseStartDate.after(coursesExpireDate)){
 | 
	
		
			
				|  |  | +			throw new BizException("课程组有效结束时间不能早于课程组有效结开始时间");
 | 
	
		
			
				|  |  | +		}
 | 
	
		
			
				|  |  | +		Date minCourseTime = courseScheduleDao.getMinCourseTime(PRACTICE, practiceGroupId);
 | 
	
		
			
				|  |  | +		if(Objects.nonNull(minCourseTime)&&courseStartDate.compareTo(minCourseTime)>0){
 | 
	
		
			
				|  |  | +			throw new BizException("课程组有效结开始时间不得晚于第一节课开始时间");
 | 
	
		
			
				|  |  | +		}
 | 
	
		
			
				|  |  | +		Date maxCourseTime = courseScheduleDao.getMaxCourseTime(PRACTICE, practiceGroupId);
 | 
	
		
			
				|  |  | +		if(Objects.nonNull(maxCourseTime)&&coursesExpireDate.compareTo(maxCourseTime)<0){
 | 
	
		
			
				|  |  | +			throw new BizException("课程组有效结结束时间不得早于最后一节课结束时间");
 | 
	
		
			
				|  |  |  		}
 | 
	
		
			
				|  |  |  		if(Objects.nonNull(practiceGroup.getBuyMonths())){
 | 
	
		
			
				|  |  |  			LocalDate courseStartDay = LocalDateTime.ofInstant(practiceGroup.getCoursesStartDate().toInstant(), DateUtil.zoneId).toLocalDate();
 | 
	
	
		
			
				|  | @@ -4952,6 +4963,7 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
 | 
	
		
			
				|  |  |  		coursesGroupModifyLog.setGroupType(PRACTICE.getCode());
 | 
	
		
			
				|  |  |  		coursesGroupModifyLog.setOperatorId(user.getId());
 | 
	
		
			
				|  |  |  		coursesGroupModifyLog.setPreviousGroup(JSONObject.toJSONString(practiceGroup));
 | 
	
		
			
				|  |  | +		practiceGroup.setCoursesStartDate(courseStartDate);
 | 
	
		
			
				|  |  |  		practiceGroup.setCoursesExpireDate(DateUtil.addSeconds(DateUtil.addDays(coursesExpireDate, 1),-1));
 | 
	
		
			
				|  |  |  		practiceGroup.setUpdateTime(new Date());
 | 
	
		
			
				|  |  |  		practiceGroupDao.update(practiceGroup);
 |