레이어관리 수정
This commit is contained in:
@@ -408,4 +408,9 @@ public class LayerDto {
|
|||||||
@Schema(description = "노출여부 true, false", example = "true")
|
@Schema(description = "노출여부 true, false", example = "true")
|
||||||
private Boolean isMapYn;
|
private Boolean isMapYn;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public enum MapType {
|
||||||
|
CHANGE_MAP,
|
||||||
|
LABELING_MAP
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -147,13 +147,18 @@ public class MapLayerCoreService {
|
|||||||
.findDetailByUuid(uuid)
|
.findDetailByUuid(uuid)
|
||||||
.orElseThrow(() -> new CustomApiException("NOT_FOUND_DATA", HttpStatus.NOT_FOUND));
|
.orElseThrow(() -> new CustomApiException("NOT_FOUND_DATA", HttpStatus.NOT_FOUND));
|
||||||
|
|
||||||
if ("CHANGE_MAP".equals(isMapYn.getMapType())) {
|
LayerDto.MapType mapType;
|
||||||
entity.setIsChangeMap(isMapYn.getIsMapYn());
|
|
||||||
} else if ("LABELING_MAP".equals(isMapYn.getMapType())) {
|
try {
|
||||||
entity.setIsLabelingMap(isMapYn.getIsMapYn());
|
mapType = LayerDto.MapType.valueOf(isMapYn.getMapType());
|
||||||
} else {
|
} catch (IllegalArgumentException e) {
|
||||||
throw new CustomApiException("BAD_REQUEST", HttpStatus.BAD_REQUEST);
|
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