zouxuan 3 년 전
부모
커밋
2f55d2ee96
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/StudentExtracurricularExercisesSituationServiceImpl.java

+ 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);