|
@@ -172,14 +172,14 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
|
|
|
|
|
|
List<CourseSchedule> courseScheduleList = courseScheduleDao.findByCourseScheduleIds(courseScheduleIds);
|
|
|
|
|
|
- SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm");
|
|
|
+ SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
|
|
Date date = new Date();
|
|
|
if (courseScheduleList != null) {
|
|
|
for (CourseSchedule cs : courseScheduleList) {
|
|
|
if (cs.getStatus() == CourseStatusEnum.OVER) {
|
|
|
throw new BizException("删除失败,已结束的课程不能删除");
|
|
|
}
|
|
|
- String endDateStr = DateUtil.format(cs.getClassDate(), "yyyy-MM-dd") + " " + DateUtil.format(cs.getEndClassTime(), "HH:mm");
|
|
|
+ String endDateStr = DateUtil.format(cs.getClassDate(), "yyyy-MM-dd") + " " + DateUtil.format(cs.getEndClassTime(), "HH:mm:ss");
|
|
|
if (DateUtil.stringToDate(endDateStr, sdf).after(date)) {
|
|
|
throw new BizException("删除失败,已结束的课程不能删除");
|
|
|
}
|