| | |
| | | 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); |
| | |
| | | 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); |