|
@@ -413,7 +413,7 @@ public class StudentServeServiceImpl implements StudentServeService {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- if(CollectionUtils.isEmpty(results)){
|
|
|
+ if(!CollectionUtils.isEmpty(results)){
|
|
|
studentExtracurricularExercisesSituationDao.deleteByMonday(monDayDate.toString());
|
|
|
BigDecimal currentPage1=BigDecimal.ONE,
|
|
|
pageSize1=new BigDecimal(10000),
|
|
@@ -661,12 +661,15 @@ public class StudentServeServiceImpl implements StudentServeService {
|
|
|
public Set<Integer> getStudentWithCourse(Long courseId) {
|
|
|
CourseSchedule courseSchedule = courseScheduleDao.get(courseId);
|
|
|
if(Objects.isNull(courseSchedule)){
|
|
|
- throw new BizException("课程不存在");
|
|
|
+ return new HashSet<>();
|
|
|
}
|
|
|
LocalDate nowDate = LocalDateTime.ofInstant(courseSchedule.getClassDate().toInstant(), DateUtil.zoneId).toLocalDate();
|
|
|
|
|
|
LocalDate monDayDate = nowDate.with(DateUtil.weekFields.dayOfWeek(), DayOfWeek.MONDAY.getValue());
|
|
|
- studentExtracurricularExercisesSituationDao.findServiceWithCourse(monDayDate.toString(), courseId);
|
|
|
- return null;
|
|
|
+ List<StudentExtracurricularExercisesSituation> serviceWithCourse = studentExtracurricularExercisesSituationDao.findServiceWithCourse(monDayDate.toString(), courseId);
|
|
|
+ if(CollectionUtils.isEmpty(serviceWithCourse)){
|
|
|
+ return new HashSet<>();
|
|
|
+ }
|
|
|
+ return serviceWithCourse.stream().map(StudentExtracurricularExercisesSituation::getStudentId).collect(Collectors.toSet());
|
|
|
}
|
|
|
}
|