feat/infer_dev_260107 #1

Merged
teddy merged 43 commits from feat/infer_dev_260107 into develop 2026-01-29 10:31:31 +09:00
4 changed files with 34 additions and 11 deletions
Showing only changes of commit 7a932acd25 - Show all commits

View File

@@ -1,5 +1,6 @@
package com.kamco.cd.kamcoback.layer.dto; package com.kamco.cd.kamcoback.layer.dto;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
@@ -16,10 +17,6 @@ public class WmtsLayerInfo {
public List<ResourceUrl> resourceUrls = new ArrayList<>(); public List<ResourceUrl> resourceUrls = new ArrayList<>();
public List<Style> styles = new ArrayList<>(); public List<Style> styles = new ArrayList<>();
public void setIdentifier(String identifier) {
this.identifier = identifier;
}
public void setTitle(String title) { public void setTitle(String title) {
this.title = title; this.title = title;
} }
@@ -225,6 +222,8 @@ public class WmtsLayerInfo {
private String identifier; private String identifier;
private String title; private String title;
@JsonProperty("default")
private boolean isDefault; private boolean isDefault;
public Style() {} public Style() {}

View File

@@ -58,6 +58,7 @@ public class WmtsService {
* *
* @param dto * @param dto
*/ */
@Transactional
public void save(WmtsAddReqDto dto) { public void save(WmtsAddReqDto dto) {
// 선택한 tile 상세정보 조회 // 선택한 tile 상세정보 조회
WmtsLayerInfo info = getDetail(dto.getTitle()); WmtsLayerInfo info = getDetail(dto.getTitle());

View File

@@ -1,5 +1,6 @@
package com.kamco.cd.kamcoback.postgres.core; package com.kamco.cd.kamcoback.postgres.core;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.kamco.cd.kamcoback.common.utils.UserUtil; import com.kamco.cd.kamcoback.common.utils.UserUtil;
import com.kamco.cd.kamcoback.layer.dto.WmtsDto.WmtsAddDto; import com.kamco.cd.kamcoback.layer.dto.WmtsDto.WmtsAddDto;
import com.kamco.cd.kamcoback.postgres.entity.MapLayerEntity; import com.kamco.cd.kamcoback.postgres.entity.MapLayerEntity;
@@ -12,6 +13,7 @@ import org.springframework.stereotype.Service;
public class MapLayerCoreService { public class MapLayerCoreService {
private final MapLayerRepository mapLayerRepository; private final MapLayerRepository mapLayerRepository;
private final UserUtil userUtil; private final UserUtil userUtil;
private final ObjectMapper objectMapper;
/** /**
* wmts 저장 * wmts 저장
@@ -20,9 +22,22 @@ public class MapLayerCoreService {
*/ */
public void save(WmtsAddDto addDto) { public void save(WmtsAddDto addDto) {
MapLayerEntity mapLayerEntity = new MapLayerEntity(); try {
mapLayerEntity.setTitle(addDto.getTitle()); String rawJson = objectMapper.writeValueAsString(addDto.getWmtsLayerInfo()); // data 없는 형태로 저장
mapLayerEntity.setDescription(addDto.getDescription()); MapLayerEntity mapLayerEntity = new MapLayerEntity();
mapLayerEntity.setCreatedUid(userUtil.getId()); mapLayerEntity.setTitle(addDto.getTitle());
mapLayerEntity.setDescription(addDto.getDescription());
mapLayerEntity.setCreatedUid(userUtil.getId());
mapLayerEntity.setRawJson(rawJson);
mapLayerEntity.setIsChangeMap(true);
mapLayerEntity.setIsLabelingMap(true);
mapLayerEntity.setOrder(10L);
mapLayerEntity.setLayerType("WMTS");
mapLayerRepository.save(mapLayerEntity);
} catch (Exception e) {
e.printStackTrace();
}
//
} }
} }

View File

@@ -11,7 +11,6 @@ import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Size; import jakarta.validation.constraints.Size;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.time.ZonedDateTime; import java.time.ZonedDateTime;
import java.util.Map;
import java.util.UUID; import java.util.UUID;
import lombok.Getter; import lombok.Getter;
import lombok.Setter; import lombok.Setter;
@@ -67,9 +66,9 @@ public class MapLayerEntity {
@Column(name = "max_zoom") @Column(name = "max_zoom")
private Short maxZoom; private Short maxZoom;
@Column(name = "raw_json") @Column(name = "raw_json", columnDefinition = "jsonb")
@JdbcTypeCode(SqlTypes.JSON) @JdbcTypeCode(SqlTypes.JSON)
private Map<String, Object> rawJson; private String rawJson;
@NotNull @NotNull
@ColumnDefault("now()") @ColumnDefault("now()")
@@ -87,4 +86,13 @@ public class MapLayerEntity {
@Column(name = "updated_uid") @Column(name = "updated_uid")
private Long updatedUid; private Long updatedUid;
@Column(name = "is_change_map")
private Boolean isChangeMap;
@Column(name = "is_labeling_map")
private Boolean isLabelingMap;
@Column(name = "order")
private Long order;
} }