모델관리 기본 구조 파일 커밋, 로그관리 수정
This commit is contained in:
@@ -0,0 +1,46 @@
|
||||
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.model.dto.ModelMngDto;
|
||||
import com.kamco.cd.kamcoback.model.service.ModelMngService;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.media.Content;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
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 lombok.RequiredArgsConstructor;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Tag(name = "모델 관리", description = "모델 관리 API")
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/api/model")
|
||||
public class ModelMngApiController {
|
||||
|
||||
private final ModelMngService modelMngService;
|
||||
|
||||
@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)
|
||||
})
|
||||
@GetMapping
|
||||
public ApiResponseDto<List<ModelMngDto.Basic>> getFindAll() {
|
||||
return ApiResponseDto.createOK(modelMngService.findModelMngAll());
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,59 @@
|
||||
package com.kamco.cd.kamcoback.model.dto;
|
||||
|
||||
import com.kamco.cd.kamcoback.common.utils.interfaces.JsonFormatDttm;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Getter;
|
||||
|
||||
import java.time.ZonedDateTime;
|
||||
|
||||
public class ModelMngDto {
|
||||
|
||||
@Schema(name = "ModelMng Basic", description = "모델관리 엔티티 기본 정보")
|
||||
@Getter
|
||||
public static class Basic {
|
||||
|
||||
private final Long id;
|
||||
private final String modelNm;
|
||||
private final String modelCate;
|
||||
private final String modelPath;
|
||||
|
||||
@JsonFormatDttm
|
||||
private final ZonedDateTime createdDttm;
|
||||
private final Long createdUid;
|
||||
|
||||
@JsonFormatDttm
|
||||
private final ZonedDateTime updatedDttm;
|
||||
private final Long updatedUid;
|
||||
private final String modelCntnt;
|
||||
|
||||
public Basic(
|
||||
Long id,
|
||||
String modelNm,
|
||||
String modelCate,
|
||||
String modelPath,
|
||||
ZonedDateTime createdDttm,
|
||||
Long createdUid,
|
||||
ZonedDateTime updatedDttm,
|
||||
Long updatedUid,
|
||||
String modelCntnt
|
||||
) {
|
||||
this.id = id;
|
||||
this.modelNm = modelNm;
|
||||
this.modelCate = modelCate;
|
||||
this.modelPath = modelPath;
|
||||
this.createdDttm = createdDttm;
|
||||
this.createdUid = createdUid;
|
||||
this.updatedDttm = updatedDttm;
|
||||
this.updatedUid = updatedUid;
|
||||
this.modelCntnt = modelCntnt;
|
||||
}
|
||||
}
|
||||
|
||||
@Schema(name = "FinalModelDto", description = "최종 등록 모델")
|
||||
@Getter
|
||||
public static class FinalModelDto {
|
||||
private String modelNm;
|
||||
private String modelCate;
|
||||
private String modelVer;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
package com.kamco.cd.kamcoback.model.service;
|
||||
|
||||
import com.kamco.cd.kamcoback.model.dto.ModelMngDto;
|
||||
import com.kamco.cd.kamcoback.postgres.core.ModelMngCoreService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
@RequiredArgsConstructor
|
||||
@Transactional(readOnly = true)
|
||||
public class ModelMngService {
|
||||
|
||||
private final ModelMngCoreService modelMngCoreService;
|
||||
|
||||
public List<ModelMngDto.Basic> findModelMngAll(){
|
||||
return modelMngCoreService.findModelMngAll();
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user