zouxuan 4 years ago
parent
commit
5aaae893de

+ 3 - 1
mec-biz/src/main/java/com/ym/mec/biz/service/impl/CourseScheduleServiceImpl.java

@@ -28,7 +28,6 @@ import com.ym.mec.util.collection.ListUtil;
 import com.ym.mec.util.collection.MapUtil;
 import com.ym.mec.util.collection.MapUtil;
 import com.ym.mec.util.date.DateUtil;
 import com.ym.mec.util.date.DateUtil;
 import com.ym.mec.util.json.JsonUtil;
 import com.ym.mec.util.json.JsonUtil;
-
 import org.apache.commons.collections.ListUtils;
 import org.apache.commons.collections.ListUtils;
 import org.apache.commons.lang3.StringUtils;
 import org.apache.commons.lang3.StringUtils;
 import org.slf4j.Logger;
 import org.slf4j.Logger;
@@ -3839,6 +3838,9 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
         oldCourseSchedule.setUpdateTime(date);
         oldCourseSchedule.setUpdateTime(date);
 
 
         if(DateUtil.minutesBetween(endDateTime,date) > 0){
         if(DateUtil.minutesBetween(endDateTime,date) > 0){
+        	if(oldCourseSchedule.getStatus() == CourseStatusEnum.OVER){
+        		throw new BizException("调整失败:已结束的课程无法调整至已结束");
+			}
             oldCourseSchedule.setStatus(CourseStatusEnum.OVER);
             oldCourseSchedule.setStatus(CourseStatusEnum.OVER);
         }else if(DateUtil.minutesBetween(date,startDateTime) > 0){
         }else if(DateUtil.minutesBetween(date,startDateTime) > 0){
             oldCourseSchedule.setStatus(CourseStatusEnum.NOT_START);
             oldCourseSchedule.setStatus(CourseStatusEnum.NOT_START);