| | |
| | | } |
| | | |
| | | @Async("threadPoolTaskExecutor") |
| | | public int insertVocVals(List<VocVals> list) throws InterruptedException { |
| | | public void insertVocVals(List<VocVals> list) throws InterruptedException { |
| | | List<List<VocVals>> lists = Lists.partition(list, IAsyncService.BATCH_INSERT_500); |
| | | |
| | | CountDownLatch countDownLatch = new CountDownLatch(list.size()); |
| | |
| | | |
| | | countDownLatch.await(); |
| | | logger.info("------ VOC.csv," + lists.size() + " 条数据已入库 ------"); |
| | | |
| | | return list.size(); |
| | | } |
| | | |
| | | private void executeAsync(List<VocVals> corpList, CountDownLatch countDownLatch) { |