|
@@ -1,6 +1,7 @@
|
1
|
1
|
package com.lqkj.link.module.zone.service;
|
2
|
2
|
|
3
|
3
|
import com.alibaba.fastjson2.JSON;
|
|
4
|
+import com.alibaba.fastjson2.JSONArray;
|
4
|
5
|
import com.alibaba.fastjson2.JSONObject;
|
5
|
6
|
import com.lqkj.link.module.authority.domain.UserInfo;
|
6
|
7
|
import com.lqkj.link.module.authority.repository.UserInfoRepository;
|
|
@@ -11,6 +12,7 @@ import com.lqkj.link.module.zone.repository.ZoneInfoRepository;
|
11
|
12
|
import com.lqkj.link.util.AliOSSUtils;
|
12
|
13
|
import com.lqkj.link.util.Unzipper;
|
13
|
14
|
import org.apache.commons.lang3.StringUtils;
|
|
15
|
+import org.aspectj.weaver.ast.Var;
|
14
|
16
|
import org.locationtech.jts.geom.Coordinate;
|
15
|
17
|
import org.locationtech.jts.geom.GeometryFactory;
|
16
|
18
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
@@ -346,4 +348,17 @@ public class ZoneInfoService {
|
346
|
348
|
return zoneInfoRepository.findById(zoneId).get().getInitLocation();
|
347
|
349
|
}
|
348
|
350
|
|
|
351
|
+ public List<Map<String, Object>> getSpawnPointList(Integer zoneId) {
|
|
352
|
+ List<Map<String, Object>> spawnPointList = zoneInfoRepository.getSpawnPointList(zoneId);
|
|
353
|
+ ArrayList<Map<String, Object>> maps = new ArrayList<>();
|
|
354
|
+ for (Map<String, Object> map : spawnPointList) {
|
|
355
|
+ HashMap<String, Object> stringObjectHashMap = new HashMap<>();
|
|
356
|
+ stringObjectHashMap.put("id", map.get("id"));
|
|
357
|
+ stringObjectHashMap.put("zone_id", map.get("zone_id"));
|
|
358
|
+ stringObjectHashMap.put("name", map.get("name"));
|
|
359
|
+ stringObjectHashMap.put("init_location", JSONObject.parse(map.get("init_location").toString()));
|
|
360
|
+ maps.add(stringObjectHashMap);
|
|
361
|
+ }
|
|
362
|
+ return maps;
|
|
363
|
+ }
|
349
|
364
|
}
|