refactor: query string 방식으로 변경, validation 추가
This commit is contained in:
parent
e5f7e728b0
commit
07f1a004b7
@ -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.ApiTrestleDetailResponse;
|
||||||
import com.interplug.qcast.biz.master.dto.ApiTrestleRequest;
|
import com.interplug.qcast.biz.master.dto.ApiTrestleRequest;
|
||||||
import com.interplug.qcast.biz.master.dto.ApiTrestleResponse;
|
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.Operation;
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
|
|
||||||
import org.springframework.cloud.openfeign.SpringQueryMap;
|
import org.springframework.cloud.openfeign.SpringQueryMap;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
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.PostMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
@RestController
|
@RestController
|
||||||
@ -34,9 +35,12 @@ public class MasterController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Operation(description = "모듈 타입별 아이템 목록을 조회한다.")
|
@Operation(description = "모듈 타입별 아이템 목록을 조회한다.")
|
||||||
@GetMapping("/getModuleTypeItemList/{roofMatlCd}")
|
@GetMapping("/getModuleTypeItemList")
|
||||||
public ApiResponse<ApiModuleTpResponse> getModuleTypeItemList(
|
public ApiResponse<ApiModuleTpResponse> 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);
|
return masterService.getModuleTypeItemList(roofMaterialCd);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user