| | |
| | | Map<String, Object> map = JSONObject.parseObject(message, Map.class); |
| | | if (map.size() > 0) { |
| | | Boolean enabled = (Boolean) map.get("enabled"); |
| | | if(enabled==null) |
| | | { |
| | | return; |
| | | } |
| | | if (enabled) { |
| | | //启动全局推送 |
| | | List<ArdAppPosition> newList = new ArrayList<>(AppPositionPushService.getAppPositionList()); |
| | |
| | | AppPositionPushService.tempUserTimerMap.remove(userId); |
| | | AppPositionPushService.tempDataMap.remove(userId); |
| | | } |
| | | //region 旧方法 |
| | | // Map<String, List<ArdAppPosition>> dataMap = new HashMap<>(); |
| | | // List<ArdAppPosition> positionList = AppPositionPush.initDataMap.get(userId);//获取当前用户的默认发送的数据map |
| | | // if(frequency>0) |
| | | // { |
| | | // //接收到频率大于0,属于申请引导,获取除引导外的其他app用户的位置List |
| | | // List<ArdAppPosition> appPositionList = positionList.stream() |
| | | // .filter(obj -> !obj.getUserId().equals(uId)) |
| | | // .collect(Collectors.toList()); |
| | | // dataMap.put(userId,appPositionList); |
| | | // } |
| | | // else { |
| | | // //接收到频率等于0,属于释放引导,获取到全部app用户的位置List |
| | | // dataMap.put(userId,AppPositionPush.getAppPositionList()); |
| | | // } |
| | | // AppPositionPush.initDataMap.putAll(dataMap);//更新初始会话默认数据map |
| | | // AppPositionPush.startLocationPushTask(userId,session,uId, frequency);//开启新任务 |
| | | //endregion |
| | | } |
| | | } |
| | | catch (Exception ex) |