| | |
| | | public int[][] getData(Integer mapType, List<int[]> whitePoints, List<int[]> shuttlePoints) { |
| | | try { |
| | | RedisUtil redisUtil = SpringUtils.getBean(RedisUtil.class); |
| | | Object object = redisUtil.get(RedisKeyType.BASIC_MAP.key + lev); |
| | | if (object == null) { |
| | | List<Object> arrayList = redisUtil.lGet(RedisKeyType.BASIC_MAP.key + lev, 0, -1); |
| | | if (arrayList == null) { |
| | | return null; |
| | | } |
| | | |
| | | //解析json地图数据 |
| | | ArrayList arrayList = JSON.parseObject(object.toString(), ArrayList.class); |
| | | List<List<MapNode>> lists = filterMap(mapType, arrayList, lev, whitePoints, shuttlePoints);//过滤地图数据 |
| | | int[][] map = new int[lists.size()][]; |
| | | int j = 0; |
| | |
| | | public List<List<MapNode>> getJsonData(Integer mapType, List<int[]> whitePoints, List<int[]> shuttlePoints) { |
| | | try { |
| | | RedisUtil redisUtil = SpringUtils.getBean(RedisUtil.class); |
| | | Object object = redisUtil.get(RedisKeyType.BASIC_MAP.key + lev); |
| | | if (object == null) { |
| | | List<Object> arrayList = redisUtil.lGet(RedisKeyType.BASIC_MAP.key + lev, 0, -1); |
| | | if (arrayList == null) { |
| | | return null; |
| | | } |
| | | |
| | | //解析json地图数据 |
| | | ArrayList arrayList = JSON.parseObject(object.toString(), ArrayList.class); |
| | | List<List<MapNode>> lists = filterMap(mapType, arrayList, lev, whitePoints, shuttlePoints);//过滤地图数据 |
| | | return lists; |
| | | |
| | |
| | | public List<List<MapNode>> getJsonData(Integer lev, Integer mapType, List<int[]> whitePoints, List<int[]> shuttlePoints) { |
| | | try { |
| | | RedisUtil redisUtil = SpringUtils.getBean(RedisUtil.class); |
| | | Object object = redisUtil.get(RedisKeyType.BASIC_MAP.key + lev); |
| | | if (object == null) { |
| | | List<Object> arrayList = redisUtil.lGet(RedisKeyType.BASIC_MAP.key + lev, 0, -1); |
| | | if (arrayList == null) { |
| | | return null; |
| | | } |
| | | |
| | | //解析json地图数据 |
| | | ArrayList arrayList = JSON.parseObject(object.toString(), ArrayList.class); |
| | | List<List<MapNode>> lists = filterMap(mapType, arrayList, lev, whitePoints, shuttlePoints);//过滤地图数据 |
| | | return lists; |
| | | |