|
@@ -2047,18 +2047,17 @@ public class ClassGroupServiceImpl extends BaseServiceImpl<Integer, ClassGroup>
|
|
|
|
|
|
@Override
|
|
|
public void updateClassGroupInfo(Integer classGroupId) {
|
|
|
+ Date now = new Date();
|
|
|
ClassGroup classGroup=classGroupDao.get(classGroupId);
|
|
|
List<CourseSchedule> courseSchedules = courseScheduleDao.findClassGroupCourseSchedules(classGroupId);
|
|
|
int totalClassTimes=courseSchedules.size();
|
|
|
int currentClassTimes=0;
|
|
|
for (CourseSchedule courseSchedule : courseSchedules) {
|
|
|
- if(courseSchedule.getStatus().equals(CourseStatusEnum.OVER)){
|
|
|
+ if(courseSchedule.getEndClassTime().before(now)){
|
|
|
currentClassTimes+=1;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- Date now = new Date();
|
|
|
-
|
|
|
classGroup.setTotalClassTimes(totalClassTimes);
|
|
|
classGroup.setCurrentClassTimes(currentClassTimes);
|
|
|
Integer studentNum = classGroupStudentMapperDao.countClassGroupStudentNum(classGroupId);
|