enum 공통코드로 추가
This commit is contained in:
@@ -291,7 +291,7 @@ public class CommonCodeApiController {
|
||||
return ApiResponseDto.ok(count);
|
||||
}
|
||||
|
||||
@Operation(summary = "코드 조회", description = "enum 코드 조회")
|
||||
@Operation(summary = "코드 조회", description = "코드 리스트 조회")
|
||||
@ApiResponses(
|
||||
value = {
|
||||
@ApiResponse(
|
||||
@@ -303,8 +303,25 @@ public class CommonCodeApiController {
|
||||
schema = @Schema(implementation = CodeDto.class))),
|
||||
@ApiResponse(responseCode = "500", description = "서버 오류", content = @Content)
|
||||
})
|
||||
@GetMapping("/enums")
|
||||
public ApiResponseDto<Map<String, List<CodeDto>>> getCode() {
|
||||
return ApiResponseDto.ok(commonCodeService.getAllCodes());
|
||||
@GetMapping("/type/codes")
|
||||
public ApiResponseDto<Map<String, List<CodeDto>>> getTypeCodes() {
|
||||
return ApiResponseDto.ok(commonCodeService.getTypeCodes());
|
||||
}
|
||||
|
||||
@Operation(summary = "코드 단건 조회", description = "코드 조회")
|
||||
@ApiResponses(
|
||||
value = {
|
||||
@ApiResponse(
|
||||
responseCode = "200",
|
||||
description = "코드 조회 성공",
|
||||
content =
|
||||
@Content(
|
||||
mediaType = "application/json",
|
||||
schema = @Schema(implementation = CodeDto.class))),
|
||||
@ApiResponse(responseCode = "500", description = "서버 오류", content = @Content)
|
||||
})
|
||||
@GetMapping("/type/{type}")
|
||||
public ApiResponseDto<List<CodeDto>> getTypeCode(@PathVariable String type) {
|
||||
return ApiResponseDto.ok(commonCodeService.getTypeCode(type));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user