|
@@ -463,8 +463,11 @@ public class StudentServeServiceImpl implements StudentServeService {
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public void updateExercisesSituation(List<Integer> studentIds, Integer teacherId) {
|
|
|
- LocalDate nowDate = LocalDateTime.now(DateUtil.zoneId).toLocalDate();
|
|
|
+ public void updateExercisesSituation(Date date,List<Integer> studentIds, Integer teacherId) {
|
|
|
+ LocalDate nowDate = LocalDateTime.ofInstant(date.toInstant(), DateUtil.zoneId).toLocalDate();
|
|
|
+ if(Objects.isNull(date)){
|
|
|
+ nowDate = LocalDateTime.now(DateUtil.zoneId).toLocalDate();
|
|
|
+ }
|
|
|
|
|
|
LocalDate monDayDate = nowDate.with(DateUtil.weekFields.dayOfWeek(), DayOfWeek.MONDAY.getValue());
|
|
|
LocalDate sunDayDate = nowDate.with(DateUtil.weekFields.dayOfWeek(), DayOfWeek.SUNDAY.getValue());
|
|
@@ -507,6 +510,9 @@ public class StudentServeServiceImpl implements StudentServeService {
|
|
|
}
|
|
|
|
|
|
List<StudentExtracurricularExercisesSituation> weekServiceWithStudents = studentExtracurricularExercisesSituationDao.findWeekServiceWithStudents(monDayDate.toString(), teacherId, studentIds);
|
|
|
+ if(!CollectionUtils.isEmpty(weekServiceWithStudents)){
|
|
|
+ return;
|
|
|
+ }
|
|
|
|
|
|
for (StudentExtracurricularExercisesSituation weekServiceWithStudent : weekServiceWithStudents) {
|
|
|
List<StudentServeCourseHomeworkDto> studentHomeworks = studentHomeworkMap.get(weekServiceWithStudent.getStudentId());
|
|
@@ -573,9 +579,7 @@ public class StudentServeServiceImpl implements StudentServeService {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- if(!CollectionUtils.isEmpty(weekServiceWithStudents)){
|
|
|
- studentExtracurricularExercisesSituationDao.batchUpdate(weekServiceWithStudents);
|
|
|
- }
|
|
|
+ studentExtracurricularExercisesSituationDao.batchUpdate(weekServiceWithStudents);
|
|
|
}
|
|
|
|
|
|
@Override
|