Commit 17ae467d by 涂亚平

回家同步

1 parent 101a8dab
...@@ -103,36 +103,36 @@ public class MoniMajorServiceImpl extends ServiceImpl<MoniMajorMapper, MoniMajor ...@@ -103,36 +103,36 @@ public class MoniMajorServiceImpl extends ServiceImpl<MoniMajorMapper, MoniMajor
List<OutPutVO> outPuts = simulationSeekerDTO.getOutPuts(); List<OutPutVO> outPuts = simulationSeekerDTO.getOutPuts();
// 定义线程池的大小,根据你的需要来设置 // 定义线程池的大小,根据你的需要来设置
// ExecutorService executor = Executors.newFixedThreadPool(outPuts.size()); ExecutorService executor = Executors.newFixedThreadPool(outPuts.size());
// 用于存放Future对象的列表,Future对象可以用来检查任务是否完成 // 用于存放Future对象的列表,Future对象可以用来检查任务是否完成
// List<Future<?>> futures = new ArrayList<>(); List<Future<?>> futures = new ArrayList<>();
for (OutPutVO outPutVO : outPuts) { for (OutPutVO outPutVO : outPuts) {
// Future<?> future = executor.submit(new Callable() { Future<?> future = executor.submit(new Callable() {
// @Override @Override
// public Object call() throws Exception { public Object call() throws Exception {
// 这里执行你的任务 // 这里执行你的任务
dataProcess(outPutVO); dataProcess(outPutVO);
// return null; return null;
// } }
// }); });
// 将Future对象添加到列表中 // 将Future对象添加到列表中
// futures.add(future); futures.add(future);
} }
// 关闭ExecutorService,不再接受新任务 // 关闭ExecutorService,不再接受新任务
// executor.shutdown(); executor.shutdown();
// // 等待所有任务完成 // 等待所有任务完成
// for (Future<?> future : futures) { for (Future<?> future : futures) {
// try { try {
// // get方法会阻塞直到任务完成 // get方法会阻塞直到任务完成
// future.get(); future.get();
// } catch (Exception e) { } catch (Exception e) {
// e.printStackTrace(); e.printStackTrace();
// } }
// } }
// //
// Collections.shuffle(data); // Collections.shuffle(data);
// ExcelUtil.writeMapExcel(excelFieldVOS, data); // ExcelUtil.writeMapExcel(excelFieldVOS, data);
......
...@@ -56,7 +56,6 @@ ...@@ -56,7 +56,6 @@
LEFT JOIN moni_company t2 ON t.job_type = t2.job_major LEFT JOIN moni_company t2 ON t.job_type = t2.job_major
WHERE WHERE
t.major_type = #{majorType} t.major_type = #{majorType}
limit 700000
</select> </select>
</mapper> </mapper>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!