Explorar o código

学员小课统计

zouxuan %!s(int64=3) %!d(string=hai) anos
pai
achega
43c3a2c61d

+ 5 - 12
mec-biz/src/main/java/com/ym/mec/biz/service/impl/StudentStatisticsServiceImpl.java

@@ -63,18 +63,11 @@ public class StudentStatisticsServiceImpl extends BaseServiceImpl<Integer, Stude
 		statisticsList.addAll(studentStatisticsDao.queryStatisticsNormalGroupNum());
 		statisticsList.removeAll(Collections.singleton(null));
 		if(CollectionUtils.isNotEmpty(statisticsList)){
-			ExecutorService executor = Executors.newCachedThreadPool();
-			CompletableFuture.runAsync(()->{
-				try {
-					studentStatisticsDao.clean();
-					List<List<StudentStatistics>> partition = Lists.partition(statisticsList, 1000);
-					for (List<StudentStatistics> studentStatistics : partition) {
-						studentStatisticsDao.batchUpdate(studentStatistics);
-					}
-				} catch (Exception e) {
-					e.printStackTrace();
-				}
-			},executor);
+//			studentStatisticsDao.clean();
+			List<List<StudentStatistics>> partition = Lists.partition(statisticsList, 1000);
+			for (List<StudentStatistics> studentStatistics : partition) {
+				studentStatisticsDao.batchUpdate(studentStatistics);
+			}
 		}
 	}