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