레이어관리 수정

This commit is contained in:
2026-01-30 12:04:11 +09:00
parent 2865b075a2
commit f3453ab499
2 changed files with 15 additions and 5 deletions

View File

@@ -408,4 +408,9 @@ public class LayerDto {
@Schema(description = "노출여부 true, false", example = "true")
private Boolean isMapYn;
}
public enum MapType {
CHANGE_MAP,
LABELING_MAP
}
}

View File

@@ -147,13 +147,18 @@ public class MapLayerCoreService {
.findDetailByUuid(uuid)
.orElseThrow(() -> new CustomApiException("NOT_FOUND_DATA", HttpStatus.NOT_FOUND));
if ("CHANGE_MAP".equals(isMapYn.getMapType())) {
entity.setIsChangeMap(isMapYn.getIsMapYn());
} else if ("LABELING_MAP".equals(isMapYn.getMapType())) {
entity.setIsLabelingMap(isMapYn.getIsMapYn());
} else {
LayerDto.MapType mapType;
try {
mapType = LayerDto.MapType.valueOf(isMapYn.getMapType());
} catch (IllegalArgumentException e) {
throw new CustomApiException("BAD_REQUEST", HttpStatus.BAD_REQUEST);
}
switch (mapType) {
case CHANGE_MAP -> entity.setIsChangeMap(isMapYn.getIsMapYn());
case LABELING_MAP -> entity.setIsLabelingMap(isMapYn.getIsMapYn());
}
}
/**