浏览代码

学员小课统计

zouxuan 3 年之前
父节点
当前提交
43c3a2c61d
共有 1 个文件被更改,包括 5 次插入12 次删除
  1. 5 12
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/StudentStatisticsServiceImpl.java

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