Przeglądaj źródła

云教练作业优化

zouxuan 3 lat temu
rodzic
commit
917b29e2e8

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

@@ -429,14 +429,14 @@ public class StudentExtracurricularExercisesSituationServiceImpl extends BaseSer
 			Set<Long> collect = courseHomeworks.stream().map(e -> e.getCourseScheduleId()).collect(Collectors.toSet());
 			courseIds.removeAll(collect);
 		}
+		if(courseIds.size() == 0){
+			return pageInfo;
+		}
 		Map<Long,Long> memberNumMap = MapUtil.convertIntegerMap(studentDao.countCourseStudentMemberNum(courseIds));
 		Map<Long,String> studentSubjectMap = MapUtil.convertMybatisMap(studentDao.countCourseStudentSubjectName(courseIds));
 		Map<Long, Long> studentNumMap = MapUtil.convertIntegerMap(courseScheduleStudentPaymentDao.countCourseStudentNum(courseIds));
 		Map<Integer, Long> studentNumCourseMap = MapUtil.convertIntegerMap(studentAttendanceDao.countStudentAttendancesByCourses(courseIds));
 
-		if(courseIds.size() == 0){
-			return pageInfo;
-		}
 		List<TeacherServeHomeworkPojo> homeworkPojos;
 		int count = courseScheduleDao.countHomeworkPojoByCourseScheduleIds(params);
 		if (count > 0) {