whyclxw
2025-01-19 ba98d8ef25006b1ca67688f3cf59cd76428f8a90
首页推送
2个文件已修改
15 ■■■■■ 已修改文件
src/main/java/com/whyc/service/AreaInfService.java 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/whyc/webSocket/HomeSocket.java 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/whyc/service/AreaInfService.java
@@ -608,4 +608,11 @@
        }
        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(),"地图顶部的管理的区域包含子区域");
    }
}
src/main/java/com/whyc/webSocket/HomeSocket.java
@@ -76,7 +76,7 @@
        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);
@@ -107,6 +107,12 @@
                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();