zouxuan 3 years ago
parent
commit
2f55d2ee96

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

@@ -602,7 +602,7 @@ public class StudentExtracurricularExercisesSituationServiceImpl extends BaseSer
 			return;
 		}
 		studentExtracurricularExercisesSituationDao.batchInsert(situations);
-		String collect = situations.stream().map(e -> e.getCourseIds()).filter(e -> StringUtils.isNotEmpty(e)).collect(Collectors.joining(","));
+		String collect = situations.stream().map(e -> e.getCourseIds()).filter(e -> StringUtils.isNotEmpty(e)).distinct().collect(Collectors.joining(","));
 		if(StringUtils.isNotEmpty(collect)){
 			//更新课程服务指标
 			courseScheduleStatisticsDao.updateCourseService(collect,1);
@@ -666,7 +666,7 @@ public class StudentExtracurricularExercisesSituationServiceImpl extends BaseSer
 		}
 //		List<Long> collect1 = situations.stream().map(e -> e.getId()).collect(Collectors.toList());
 //		studentExtracurricularExercisesSituationDao.batchDelete(collect1);
-		String collect = situations.stream().map(e -> e.getCourseIds()).filter(e -> StringUtils.isNotEmpty(e)).collect(Collectors.joining(","));
+		String collect = situations.stream().map(e -> e.getCourseIds()).filter(e -> StringUtils.isNotEmpty(e)).distinct().collect(Collectors.joining(","));
 		if(StringUtils.isNotEmpty(collect)){
 			//更新课程服务指标
 			courseScheduleStatisticsDao.updateCourseService(collect,0);