diff --git a/src/main/java/com/interplug/qcast/biz/master/MasterController.java b/src/main/java/com/interplug/qcast/biz/master/MasterController.java index 9518fedf..6f831b3e 100644 --- a/src/main/java/com/interplug/qcast/biz/master/MasterController.java +++ b/src/main/java/com/interplug/qcast/biz/master/MasterController.java @@ -9,15 +9,16 @@ import com.interplug.qcast.biz.master.dto.ApiTrestleDetailRequest; import com.interplug.qcast.biz.master.dto.ApiTrestleDetailResponse; import com.interplug.qcast.biz.master.dto.ApiTrestleRequest; import com.interplug.qcast.biz.master.dto.ApiTrestleResponse; +import com.interplug.qcast.config.Exception.ErrorCode; +import com.interplug.qcast.config.Exception.QcastException; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.tags.Tag; import lombok.RequiredArgsConstructor; - import org.springframework.cloud.openfeign.SpringQueryMap; 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.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RestController; @RestController @@ -34,9 +35,12 @@ public class MasterController { } @Operation(description = "모듈 타입별 아이템 목록을 조회한다.") - @GetMapping("/getModuleTypeItemList/{roofMatlCd}") + @GetMapping("/getModuleTypeItemList") public ApiResponse getModuleTypeItemList( - @PathVariable("roofMatlCd") String roofMaterialCd) { + @RequestParam("roofMatlCd") String roofMaterialCd) throws QcastException { + if (roofMaterialCd == null || roofMaterialCd.trim().isEmpty()) { + throw new QcastException(ErrorCode.INVALID_INPUT_VALUE); + } return masterService.getModuleTypeItemList(roofMaterialCd); }