변화지도, 라벨링 맵 리스트 uuid, rawjson 추가
This commit is contained in:
@@ -244,6 +244,14 @@ public class LayerDto {
|
||||
|
||||
@JsonIgnore private String bboxGeometry;
|
||||
|
||||
@Schema(description = "uuid")
|
||||
private UUID uuid;
|
||||
|
||||
@JsonIgnore private String rawJsonString;
|
||||
|
||||
@Schema(description = "rawJson")
|
||||
private JsonNode rawJson;
|
||||
|
||||
public LayerMapDto(
|
||||
String layerType,
|
||||
String tag,
|
||||
@@ -255,7 +263,9 @@ public class LayerDto {
|
||||
BigDecimal maxLat,
|
||||
Short minZoom,
|
||||
Short maxZoom,
|
||||
String bboxGeometry) {
|
||||
String bboxGeometry,
|
||||
UUID uuid,
|
||||
String rawJsonString) {
|
||||
this.layerType = layerType;
|
||||
this.tag = tag;
|
||||
this.sortOrder = sortOrder;
|
||||
@@ -267,11 +277,13 @@ public class LayerDto {
|
||||
this.minZoom = minZoom;
|
||||
this.maxZoom = maxZoom;
|
||||
this.bboxGeometry = bboxGeometry;
|
||||
this.uuid = uuid;
|
||||
this.rawJsonString = rawJsonString;
|
||||
|
||||
JsonNode geoJson = null;
|
||||
|
||||
JsonNode rawJson = null;
|
||||
ObjectMapper mapper = new ObjectMapper();
|
||||
if (bboxGeometry != null) {
|
||||
ObjectMapper mapper = new ObjectMapper();
|
||||
try {
|
||||
geoJson = mapper.readTree(bboxGeometry);
|
||||
} catch (JsonProcessingException e) {
|
||||
@@ -279,6 +291,15 @@ public class LayerDto {
|
||||
}
|
||||
}
|
||||
|
||||
if (rawJsonString != null) {
|
||||
try {
|
||||
rawJson = mapper.readTree(rawJsonString);
|
||||
} catch (JsonProcessingException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
|
||||
this.rawJson = rawJson;
|
||||
this.bbox = geoJson;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -109,7 +109,9 @@ public class MapLayerRepositoryImpl implements MapLayerRepositoryCustom {
|
||||
mapLayerEntity.minLon,
|
||||
mapLayerEntity.minLat,
|
||||
mapLayerEntity.maxLon,
|
||||
mapLayerEntity.maxLat)))
|
||||
mapLayerEntity.maxLat),
|
||||
mapLayerEntity.uuid,
|
||||
Expressions.stringTemplate("cast({0} as text)", mapLayerEntity.rawJson)))
|
||||
.from(mapLayerEntity)
|
||||
.where(layerTypeCondition(type), mapLayerEntity.isDeleted.isFalse())
|
||||
.orderBy(mapLayerEntity.order.asc())
|
||||
|
||||
Reference in New Issue
Block a user