| | |
| | | public synchronized void initRealtimeBasMap() { |
| | | try { |
| | | List<Dict> dicts = dictService.list(new LambdaQueryWrapper<Dict>() |
| | | .like(Dict::getFlag, "map") |
| | | .like(Dict::getFlag, "map-") |
| | | .eq(Dict::getStatus, 1)); |
| | | |
| | | TreeMap<Integer, ArrayList<ArrayList<MapNode>>> levData = new TreeMap<>(); |
| | |
| | | map.setUpdateTime(now); |
| | | map.setLev(lev); |
| | | |
| | | //将地图数据存入redis |
| | | redisUtil.set(DeviceRedisConstant.MAP + lev, JSON.toJSONString(map)); |
| | | Object data = redisUtil.get(DeviceRedisConstant.MAP + lev); |
| | | if (data != null) { |
| | | //将地图数据存入redis |
| | | redisUtil.set(DeviceRedisConstant.MAP + lev, JSON.toJSONString(map)); |
| | | } |
| | | } |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |