| | |
| | | } |
| | | return new Response().set(1,false,"lock的使用频次"); |
| | | } |
| | | //地图顶部的管理的区域包含子区域 |
| | | public Response getHomeAllAinf(int userId, int urole) { |
| | | List<Integer> list=getAllAreaUser(userId,urole); |
| | | List<Integer> disList=list.stream().distinct() |
| | | .collect(Collectors.toList()); |
| | | return new Response().setII(1,true,disList.size(),"地图顶部的管理的区域包含子区域"); |
| | | } |
| | | } |
| | |
| | | Map<String, Object> res = new HashMap<>(); |
| | | try { |
| | | ThreadPoolExecutor poolExecutor = ThreadPoolExecutorFactory.getPoolExecutor(); |
| | | CountDownLatch latch = new CountDownLatch(5); |
| | | CountDownLatch latch = new CountDownLatch(6); |
| | | poolExecutor.execute(() -> { |
| | | //锁的工作状态 |
| | | Response resLockState = ainfService.getLockState(userId,urole); |
| | |
| | | res.put("resAllCtlLog", resAllCtlLog); |
| | | latch.countDown(); |
| | | }); |
| | | poolExecutor.execute(() -> { |
| | | //地图顶部的管理的区域包含子区域 |
| | | Response resAllAinf = ainfService.getHomeAllAinf(userId,urole); |
| | | res.put("resAllAinf", resAllAinf); |
| | | latch.countDown(); |
| | | }); |
| | | latch.await(4, TimeUnit.MINUTES); |
| | | } catch (InterruptedException e) { |
| | | e.printStackTrace(); |