|  | @@ -48,7 +48,9 @@ import org.springframework.transaction.annotation.Transactional;
 | 
	
		
			
				|  |  |  import java.math.BigDecimal;
 | 
	
		
			
				|  |  |  import java.math.RoundingMode;
 | 
	
		
			
				|  |  |  import java.text.SimpleDateFormat;
 | 
	
		
			
				|  |  | +import java.time.Instant;
 | 
	
		
			
				|  |  |  import java.time.LocalDate;
 | 
	
		
			
				|  |  | +import java.time.temporal.ChronoUnit;
 | 
	
		
			
				|  |  |  import java.time.temporal.TemporalAdjusters;
 | 
	
		
			
				|  |  |  import java.util.*;
 | 
	
		
			
				|  |  |  import java.util.concurrent.TimeUnit;
 | 
	
	
		
			
				|  | @@ -1113,6 +1115,13 @@ public class CourseScheduleServiceImpl extends ServiceImpl<CourseScheduleDao, Co
 | 
	
		
			
				|  |  |          Date startTime = adjustVo.getStartTime();
 | 
	
		
			
				|  |  |          Date endTime = adjustVo.getEndTime();
 | 
	
		
			
				|  |  |          Date now = new Date();
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +        if(endTime==null){
 | 
	
		
			
				|  |  | +            CourseSchedule courseSchedule = baseMapper.selectById(courseId);
 | 
	
		
			
				|  |  | +            Integer minutes = Math.toIntExact(ChronoUnit.MINUTES.between(Instant.ofEpochMilli(courseSchedule.getStartTime().getTime()), Instant.ofEpochMilli(courseSchedule.getEndTime().getTime())));
 | 
	
		
			
				|  |  | +            endTime = DateUtil.offsetMinute(startTime, minutes);
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |          //校验时间是否为未来时刻
 | 
	
		
			
				|  |  |          if (startTime.before(now) || endTime.before(now)) {
 | 
	
		
			
				|  |  |              throw new BizException("排课日期必须大于当前日期");
 |