refactor: 모듈 타입별 아이템 목록 조회 api의 req param을 배열로 변경
This commit is contained in:
parent
90abb0b003
commit
37b47049b0
@ -10,6 +10,7 @@ import com.interplug.qcast.config.Exception.ErrorCode;
|
|||||||
import com.interplug.qcast.config.Exception.QcastException;
|
import com.interplug.qcast.config.Exception.QcastException;
|
||||||
import io.swagger.v3.oas.annotations.Operation;
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
|
import java.util.List;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
@ -32,8 +33,11 @@ public class MasterController {
|
|||||||
@Operation(description = "모듈 타입별 아이템 목록을 조회한다.")
|
@Operation(description = "모듈 타입별 아이템 목록을 조회한다.")
|
||||||
@GetMapping("/getModuleTypeItemList")
|
@GetMapping("/getModuleTypeItemList")
|
||||||
public ApiResponse<ApiModuleTpResponse> getModuleTypeItemList(
|
public ApiResponse<ApiModuleTpResponse> getModuleTypeItemList(
|
||||||
@RequestParam("roofMatlCd") String roofMaterialCd) throws QcastException {
|
@RequestParam("arrRoofMatlCd") List<String> roofMaterialCd) throws QcastException {
|
||||||
if (roofMaterialCd == null || roofMaterialCd.trim().isEmpty()) {
|
if (roofMaterialCd == null
|
||||||
|
|| roofMaterialCd.isEmpty()
|
||||||
|
|| roofMaterialCd.size() > 4
|
||||||
|
|| roofMaterialCd.stream().anyMatch(s -> s == null || s.trim().isEmpty())) {
|
||||||
throw new QcastException(ErrorCode.INVALID_INPUT_VALUE);
|
throw new QcastException(ErrorCode.INVALID_INPUT_VALUE);
|
||||||
}
|
}
|
||||||
return masterService.getModuleTypeItemList(roofMaterialCd);
|
return masterService.getModuleTypeItemList(roofMaterialCd);
|
||||||
|
|||||||
@ -6,7 +6,7 @@ import com.interplug.qcast.biz.master.dto.ApiResponse;
|
|||||||
import com.interplug.qcast.biz.master.dto.ApiRoofMaterialResponse;
|
import com.interplug.qcast.biz.master.dto.ApiRoofMaterialResponse;
|
||||||
import com.interplug.qcast.biz.master.dto.ApiTrestleDetailResponse;
|
import com.interplug.qcast.biz.master.dto.ApiTrestleDetailResponse;
|
||||||
import com.interplug.qcast.biz.master.dto.ApiTrestleResponse;
|
import com.interplug.qcast.biz.master.dto.ApiTrestleResponse;
|
||||||
|
import java.util.List;
|
||||||
import org.springframework.cloud.openfeign.FeignClient;
|
import org.springframework.cloud.openfeign.FeignClient;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestParam;
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
@ -22,8 +22,8 @@ public interface MasterService {
|
|||||||
// 모듈 타입별 아이템 목록 조회
|
// 모듈 타입별 아이템 목록 조회
|
||||||
@GetMapping("/moduleTypeItemList")
|
@GetMapping("/moduleTypeItemList")
|
||||||
public ApiResponse<ApiModuleTpResponse> getModuleTypeItemList(
|
public ApiResponse<ApiModuleTpResponse> getModuleTypeItemList(
|
||||||
@RequestParam("roofMatlCd") String roofMaterialCd);
|
@RequestParam("arrRoofMatlCd") List<String> roofMaterialCd);
|
||||||
|
|
||||||
// 가대 목록 조회
|
// 가대 목록 조회
|
||||||
@GetMapping("/trestle")
|
@GetMapping("/trestle")
|
||||||
public ApiResponse<ApiTrestleResponse> getTrestleList(
|
public ApiResponse<ApiTrestleResponse> getTrestleList(
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user