‘liusuyi’
2023-07-29 e94241fc70d1308ea88fec5b57e771c6ecad1cee
ard-work/src/main/java/com/ruoyi/utils/websocket/service/ChatServerEndpoint.java
@@ -59,7 +59,7 @@
            Boolean enabled = (Boolean) map.get("enabled");
            if (enabled) {
                //启动全局推送
                List<ArdAppPosition> newList = new ArrayList<>(AppPositionPushService.initDataList);
                List<ArdAppPosition> newList = new ArrayList<>(AppPositionPushService.getAppPositionList());
                AppPositionPushService.dataMap.put(userId, newList);
                if (!AppPositionPushService.userTimerMap.containsKey(userId)) {
                    Timer timer = AppPositionPushService.startTimerTask(userId, 3000);
@@ -84,19 +84,19 @@
            Integer frequency = (Integer) map.get("frequency");
            String uId = (String) map.get("userId");
            if (frequency > 0) {
                List<ArdAppPosition> List = AppPositionPushService.initDataList.stream()
                List<ArdAppPosition> List = AppPositionPushService.getAppPositionList().stream()
                        .filter(obj -> !obj.getUserId().equals(uId))
                        .collect(Collectors.toList());//去除引导后的list
                AppPositionPushService.dataMap.put(userId,List);
                List<ArdAppPosition> tempList = AppPositionPushService.initDataList.stream()
                List<ArdAppPosition> tempList = AppPositionPushService.getAppPositionList().stream()
                        .filter(obj -> obj.getUserId().equals(uId))
                        .collect(Collectors.toList());//获取引导的list
                AppPositionPushService.tempDataMap.put(userId, tempList);
                Timer timer = AppPositionPushService.startTempTimerTask(userId, frequency);
                AppPositionPushService.tempUserTimerMap.put(userId, timer);
            } else {
                List<ArdAppPosition> newList = new ArrayList<>(AppPositionPushService.initDataList);
                List<ArdAppPosition> newList = new ArrayList<>(AppPositionPushService.getAppPositionList());
                AppPositionPushService.dataMap.put(userId, newList);
                Timer timer = AppPositionPushService.tempUserTimerMap.get(userId);
                AppPositionPushService.stopTimerTask(timer);