레이어관리 수정
This commit is contained in:
@@ -408,4 +408,9 @@ public class LayerDto {
|
||||
@Schema(description = "노출여부 true, false", example = "true")
|
||||
private Boolean isMapYn;
|
||||
}
|
||||
|
||||
public enum MapType {
|
||||
CHANGE_MAP,
|
||||
LABELING_MAP
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user