33 lines
1.2 KiB
Java
33 lines
1.2 KiB
Java
package com.kri.contact.server.controller;
|
|
|
|
import com.kri.contact.server.common.enums.ResultCodeType;
|
|
import com.kri.contact.server.dto.project.ResultCodeDto;
|
|
import com.kri.contact.server.service.ResultCodeService;
|
|
import io.swagger.v3.oas.annotations.Operation;
|
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
|
import java.util.List;
|
|
import lombok.RequiredArgsConstructor;
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
import org.springframework.web.bind.annotation.PathVariable;
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
import org.springframework.web.bind.annotation.RequestParam;
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
@RestController
|
|
@RequestMapping("/api/v1/result-code")
|
|
@RequiredArgsConstructor
|
|
@Tag(name = "Result Code", description = "결과 코드 API")
|
|
public class ResultCodeController {
|
|
|
|
private final ResultCodeService resultCodeService;
|
|
|
|
@Operation(summary = "결과 코드 조회")
|
|
@GetMapping("/{prjctIdx}")
|
|
public List<ResultCodeDto> getResultCodeList(
|
|
@PathVariable long prjctIdx,
|
|
@RequestParam(required = false) ResultCodeType resultCdTy
|
|
) {
|
|
return resultCodeService.getResultCode(prjctIdx, resultCdTy);
|
|
}
|
|
}
|