./gradlew :spotlessApply 실행
This commit is contained in:
@@ -2,7 +2,6 @@ package com.kamco.cd.kamcoback.model;
|
||||
|
||||
import com.kamco.cd.kamcoback.code.dto.CommonCodeDto;
|
||||
import com.kamco.cd.kamcoback.config.api.ApiResponseDto;
|
||||
import com.kamco.cd.kamcoback.log.dto.AuditLogDto;
|
||||
import com.kamco.cd.kamcoback.model.dto.ModelMngDto;
|
||||
import com.kamco.cd.kamcoback.model.dto.ModelVerDto;
|
||||
import com.kamco.cd.kamcoback.model.service.ModelMngService;
|
||||
@@ -13,13 +12,12 @@ import io.swagger.v3.oas.annotations.responses.ApiResponse;
|
||||
import io.swagger.v3.oas.annotations.responses.ApiResponses;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.transaction.Transactional;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.data.domain.Page;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.data.domain.Page;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
@Tag(name = "모델 관리", description = "모델 관리 API")
|
||||
@RequiredArgsConstructor
|
||||
@@ -32,17 +30,17 @@ public class ModelMngApiController {
|
||||
|
||||
@Operation(summary = "목록 조회", description = "모든 모델 조회")
|
||||
@ApiResponses(
|
||||
value = {
|
||||
@ApiResponse(
|
||||
responseCode = "200",
|
||||
description = "조회 성공",
|
||||
content =
|
||||
@Content(
|
||||
mediaType = "application/json",
|
||||
schema = @Schema(implementation = CommonCodeDto.Basic.class))),
|
||||
@ApiResponse(responseCode = "404", description = "코드를 찾을 수 없음", content = @Content),
|
||||
@ApiResponse(responseCode = "500", description = "서버 오류", content = @Content)
|
||||
})
|
||||
value = {
|
||||
@ApiResponse(
|
||||
responseCode = "200",
|
||||
description = "조회 성공",
|
||||
content =
|
||||
@Content(
|
||||
mediaType = "application/json",
|
||||
schema = @Schema(implementation = CommonCodeDto.Basic.class))),
|
||||
@ApiResponse(responseCode = "404", description = "코드를 찾을 수 없음", content = @Content),
|
||||
@ApiResponse(responseCode = "500", description = "서버 오류", content = @Content)
|
||||
})
|
||||
@GetMapping
|
||||
public ApiResponseDto<List<ModelMngDto.Basic>> getFindAll() {
|
||||
return ApiResponseDto.ok(modelMngService.findModelMngAll());
|
||||
@@ -50,6 +48,7 @@ public class ModelMngApiController {
|
||||
|
||||
/**
|
||||
* 최종 등록 모델 정보
|
||||
*
|
||||
* @return ModelMngDto.FinalModelDto
|
||||
*/
|
||||
@Operation(summary = "최종 등록 모델 조회", description = "최종 등록 모델 조회")
|
||||
@@ -60,6 +59,7 @@ public class ModelMngApiController {
|
||||
|
||||
/**
|
||||
* 모델 등록 => 모델, 버전 동시 등록 (UI 상 따로 등록하는 곳 없음)
|
||||
*
|
||||
* @param addReq 모델 입력 값
|
||||
* @return ModelVerDto.Basic
|
||||
*/
|
||||
@@ -71,7 +71,8 @@ public class ModelMngApiController {
|
||||
|
||||
@Operation(summary = "모델 수정", description = "모델 수정")
|
||||
@PutMapping("/{id}")
|
||||
public ApiResponseDto<Long> update(@PathVariable Long id, @RequestBody ModelMngDto.AddReq addReq) {
|
||||
public ApiResponseDto<Long> update(
|
||||
@PathVariable Long id, @RequestBody ModelMngDto.AddReq addReq) {
|
||||
return ApiResponseDto.ok(modelMngService.update(id, addReq));
|
||||
}
|
||||
|
||||
@@ -84,19 +85,19 @@ public class ModelMngApiController {
|
||||
@Operation(summary = "모델 등록 이력", description = "모델 등록 이력")
|
||||
@GetMapping("/reg-history")
|
||||
public ApiResponseDto<Page<ModelMngDto.ModelRegHistory>> getRegHistoryList(
|
||||
@RequestParam(required = false) LocalDate startDate,
|
||||
@RequestParam(required = false) LocalDate endDate,
|
||||
@RequestParam int page,
|
||||
@RequestParam(defaultValue = "20") int size,
|
||||
@RequestParam(required = false) String searchVal,
|
||||
@RequestParam(required = false) String searchColumn
|
||||
) {
|
||||
@RequestParam(required = false) LocalDate startDate,
|
||||
@RequestParam(required = false) LocalDate endDate,
|
||||
@RequestParam int page,
|
||||
@RequestParam(defaultValue = "20") int size,
|
||||
@RequestParam(required = false) String searchVal,
|
||||
@RequestParam(required = false) String searchColumn) {
|
||||
ModelMngDto.searchReq searchReq =
|
||||
new ModelMngDto.searchReq(page, size, Optional.ofNullable(searchColumn).orElse("createdDate") + ",desc");
|
||||
//searchColumn:: Entity 컬럼명칭으로 -> 기본값 = 등록일 createdDate, (선택) 배포일 deployDttm
|
||||
new ModelMngDto.searchReq(
|
||||
page, size, Optional.ofNullable(searchColumn).orElse("createdDate") + ",desc");
|
||||
// searchColumn:: Entity 컬럼명칭으로 -> 기본값 = 등록일 createdDate, (선택) 배포일 deployDttm
|
||||
|
||||
Page<ModelMngDto.ModelRegHistory> result =
|
||||
modelMngService.getRegHistoryList(searchReq, startDate, endDate, searchVal);
|
||||
modelMngService.getRegHistoryList(searchReq, startDate, endDate, searchVal);
|
||||
|
||||
return ApiResponseDto.ok(result);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user