레이어 관리 api 추가
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
package com.kamco.cd.kamcoback.postgres.core;
|
||||
|
||||
import com.kamco.cd.kamcoback.common.utils.UserUtil;
|
||||
import com.kamco.cd.kamcoback.layer.dto.WmtsDto.WmtsAddDto;
|
||||
import com.kamco.cd.kamcoback.postgres.entity.MapLayerEntity;
|
||||
import com.kamco.cd.kamcoback.postgres.repository.layer.MapLayerRepository;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@Service
|
||||
@RequiredArgsConstructor
|
||||
public class MapLayerCoreService {
|
||||
private final MapLayerRepository mapLayerRepository;
|
||||
private final UserUtil userUtil;
|
||||
|
||||
/**
|
||||
* wmts 저장
|
||||
*
|
||||
* @param addDto
|
||||
*/
|
||||
public void save(WmtsAddDto addDto) {
|
||||
|
||||
MapLayerEntity mapLayerEntity = new MapLayerEntity();
|
||||
mapLayerEntity.setTitle(addDto.getTitle());
|
||||
mapLayerEntity.setDescription(addDto.getDescription());
|
||||
mapLayerEntity.setCreatedUid(userUtil.getId());
|
||||
}
|
||||
}
|
||||
@@ -10,8 +10,9 @@ import jakarta.persistence.Table;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import jakarta.validation.constraints.Size;
|
||||
import java.math.BigDecimal;
|
||||
import java.time.Instant;
|
||||
import java.time.ZonedDateTime;
|
||||
import java.util.Map;
|
||||
import java.util.UUID;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import org.hibernate.annotations.ColumnDefault;
|
||||
@@ -72,9 +73,18 @@ public class MapLayerEntity {
|
||||
|
||||
@NotNull
|
||||
@ColumnDefault("now()")
|
||||
@Column(name = "created_at", nullable = false)
|
||||
private Instant createdAt;
|
||||
@Column(name = "created_dttm", nullable = false)
|
||||
private ZonedDateTime createdAt = ZonedDateTime.now();
|
||||
|
||||
@Column(name = "updated_at")
|
||||
private Instant updatedAt;
|
||||
@Column(name = "updated_dttm")
|
||||
private ZonedDateTime updatedAt;
|
||||
|
||||
@Column(name = "uuid")
|
||||
private UUID uuid = UUID.randomUUID();
|
||||
|
||||
@Column(name = "created_uid")
|
||||
private Long createdUid;
|
||||
|
||||
@Column(name = "updated_uid")
|
||||
private Long updatedUid;
|
||||
}
|
||||
|
||||
@@ -3,5 +3,5 @@ package com.kamco.cd.kamcoback.postgres.repository.layer;
|
||||
import com.kamco.cd.kamcoback.postgres.entity.MapLayerEntity;
|
||||
import org.springframework.data.jpa.repository.JpaRepository;
|
||||
|
||||
public interface LayerRepository
|
||||
extends JpaRepository<MapLayerEntity, Long>, LayerRepositoryCustom {}
|
||||
public interface MapLayerRepository
|
||||
extends JpaRepository<MapLayerEntity, Long>, MapLayerRepositoryCustom {}
|
||||
@@ -1,3 +1,3 @@
|
||||
package com.kamco.cd.kamcoback.postgres.repository.layer;
|
||||
|
||||
public interface LayerRepositoryCustom {}
|
||||
public interface MapLayerRepositoryCustom {}
|
||||
@@ -3,4 +3,4 @@ package com.kamco.cd.kamcoback.postgres.repository.layer;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
@Repository
|
||||
public class LayerRepositoryImpl implements LayerRepositoryCustom {}
|
||||
public class MapLayerRepositoryImpl {}
|
||||
Reference in New Issue
Block a user