| | |
| | | Map<String, Object> res = new HashMap<>(); |
| | | try { |
| | | ThreadPoolExecutor poolExecutor = ThreadPoolExecutorFactory.getPoolExecutor(); |
| | | CountDownLatch latch = new CountDownLatch(5); |
| | | CountDownLatch latch = new CountDownLatch(3); |
| | | poolExecutor.execute(() -> { |
| | | //本月 |
| | | Response monRes = faultUploadService.groupNameCount(1, userId); |
| | | res.put("monRes", monRes); |
| | | latch.countDown(); |
| | | }); |
| | | poolExecutor.execute(() -> { |
| | | //本季度 |
| | | Response quarterRes = faultUploadService.groupNameCount(2, userId); |
| | | res.put("quarterRes", quarterRes); |
| | | latch.countDown(); |
| | | }); |
| | | poolExecutor.execute(() -> { |
| | | //本年 |
| | | Response yearRes = faultUploadService.groupNameCount(3, userId); |
| | | res.put("yearRes", yearRes); |