국유인in 연동 가능여부 api
This commit is contained in:
@@ -7,8 +7,10 @@ import com.kamco.cd.kamcoback.gukyuin.dto.ChngDetectMastDto.ChngDetectMastSearch
|
||||
import com.kamco.cd.kamcoback.gukyuin.dto.ChngDetectMastDto.ResReturn;
|
||||
import com.kamco.cd.kamcoback.gukyuin.dto.DetectMastDto.Basic;
|
||||
import com.kamco.cd.kamcoback.gukyuin.dto.DetectMastDto.DetectMastReq;
|
||||
import com.kamco.cd.kamcoback.gukyuin.dto.GukYuinDto;
|
||||
import com.kamco.cd.kamcoback.gukyuin.service.GukYuinApiService;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.media.Content;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.responses.ApiResponse;
|
||||
@@ -19,13 +21,14 @@ import java.util.List;
|
||||
import java.util.UUID;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
@Tag(name = "국유인 연동 API", description = "국유인 연동 API")
|
||||
@Tag(name = "국유in 연동 API", description = "국유in 연동 API")
|
||||
@RestController
|
||||
@RequiredArgsConstructor
|
||||
@RequestMapping("/api/gukyuin/")
|
||||
@@ -99,8 +102,27 @@ public class GukYuinApiController {
|
||||
return gukYuinApiService.list(searchDto);
|
||||
}
|
||||
|
||||
public ApiResponseDto<Boolean> getIsLinkGukYuin(UUID uuid) {
|
||||
gukYuinApiService.getIsLinkGukYuin(uuid);
|
||||
return ApiResponseDto.ok(false);
|
||||
@Operation(summary = "국유in연동 가능여부 확인", description = "국유in연동 가능여부 확인")
|
||||
@GetMapping("/is-link/{uuid}")
|
||||
@ApiResponses(
|
||||
value = {
|
||||
@ApiResponse(
|
||||
responseCode = "200",
|
||||
description = "목록 성공",
|
||||
content =
|
||||
@Content(
|
||||
mediaType = "application/json",
|
||||
schema =
|
||||
@Schema(
|
||||
implementation = GukYuinDto.isLinkDto.class,
|
||||
description = "TRUE:연동가능, FALSE:연동 불가능"))),
|
||||
@ApiResponse(responseCode = "404", description = "코드를 찾을 수 없음", content = @Content),
|
||||
@ApiResponse(responseCode = "500", description = "서버 오류", content = @Content)
|
||||
})
|
||||
public ApiResponseDto<GukYuinDto.isLinkDto> getIsLinkGukYuin(
|
||||
@Parameter(description = "uuid", example = "5799eb21-4780-48b0-a82e-e58dcbb8806b")
|
||||
@PathVariable
|
||||
UUID uuid) {
|
||||
return ApiResponseDto.ok(gukYuinApiService.getIsLinkGukYuin(uuid));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
package com.kamco.cd.kamcoback.gukyuin.dto;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.Setter;
|
||||
|
||||
public class GukYuinDto {
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public static class isLinkDto {
|
||||
|
||||
private Boolean isLinkable;
|
||||
private String message;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
package com.kamco.cd.kamcoback.gukyuin.dto;
|
||||
|
||||
import com.kamco.cd.kamcoback.common.utils.enums.EnumType;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public enum GukYuinStatus implements EnumType {
|
||||
PENDING("대기"),
|
||||
IN_PROGRESS("사용"),
|
||||
COMPLETED("완료");
|
||||
|
||||
private final String desc;
|
||||
|
||||
@Override
|
||||
public String getId() {
|
||||
return name();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getText() {
|
||||
return desc;
|
||||
}
|
||||
}
|
||||
@@ -5,6 +5,8 @@ import com.kamco.cd.kamcoback.config.resttemplate.ExternalHttpClient;
|
||||
import com.kamco.cd.kamcoback.config.resttemplate.ExternalHttpClient.ExternalCallResult;
|
||||
import com.kamco.cd.kamcoback.gukyuin.dto.ChngDetectMastDto;
|
||||
import com.kamco.cd.kamcoback.gukyuin.dto.ChngDetectMastDto.ResReturn;
|
||||
import com.kamco.cd.kamcoback.gukyuin.dto.GukYuinDto;
|
||||
import com.kamco.cd.kamcoback.postgres.core.GukYuinCoreService;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
@@ -28,6 +30,7 @@ public class GukYuinApiService {
|
||||
@Value("${gukyuin.mast}")
|
||||
private String gukyuinMastUrl;
|
||||
|
||||
private final GukYuinCoreService gukyuinCoreService;
|
||||
private final ExternalHttpClient externalHttpClient;
|
||||
private final NetUtils netUtils = new NetUtils();
|
||||
|
||||
@@ -91,7 +94,13 @@ public class GukYuinApiService {
|
||||
return masterList;
|
||||
}
|
||||
|
||||
public Boolean getIsLinkGukYuin(UUID uuid) {
|
||||
return false;
|
||||
/**
|
||||
* 국유in연동 가능여부 확인
|
||||
*
|
||||
* @param uuid uuid
|
||||
* @return
|
||||
*/
|
||||
public GukYuinDto.isLinkDto getIsLinkGukYuin(UUID uuid) {
|
||||
return gukyuinCoreService.getIsLinkGukYuin(uuid);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user