RequestParam >> ModelAttribute 변경

This commit is contained in:
changkyu choi 2024-12-13 11:04:35 +09:00
parent b7f3478485
commit 5285f3fedf
2 changed files with 14 additions and 6 deletions

View File

@ -15,6 +15,7 @@ import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
@ -44,19 +45,25 @@ public class MasterController {
@Operation(description = "가대 목록 조회")
@GetMapping("/getTrestleList")
public ApiResponse<ApiTrestleResponse> getTrestleList(@RequestParam ApiTrestleRequest params) {
public ApiResponse<ApiTrestleResponse> getTrestleList(@ModelAttribute ApiTrestleRequest params) {
System.out.println(" >>>>>>>>>>>>>>>>>>>>>>>>>> " + params.getConstMthdCd());
System.out.println(" >>>>>>>>>>>>>>>>>>>>>>>>>> " + params.getModuleTpCd());
System.out.println(" >>>>>>>>>>>>>>>>>>>>>>>>>> " + params.getRaftBaseCd());
System.out.println(" >>>>>>>>>>>>>>>>>>>>>>>>>> " + params.getRoofBaseCd());
System.out.println(" >>>>>>>>>>>>>>>>>>>>>>>>>> " + params.getRoofMatlCd());
System.out.println(" >>>>>>>>>>>>>>>>>>>>>>>>>> " + params.getTrestleMkrCd());
return masterService.getTrestleList(params);
}
@Operation(description = "시공법 목록 조회")
@GetMapping("/getConstructionList")
public ApiResponse<ApiConstructionResponse> getConstructionList(@RequestParam ApiConstructionRequest params) {
public ApiResponse<ApiConstructionResponse> getConstructionList(@ModelAttribute ApiConstructionRequest params) {
return masterService.getConstructionList(params);
}
@Operation(description = "가대 상세 조회")
@GetMapping("/getTrestleDetailList")
public ApiResponse<ApiTrestleDetailResponse> getTrestleDetailList(@RequestParam ApiTrestleDetailRequest params) {
public ApiResponse<ApiTrestleDetailResponse> getTrestleDetailList(@ModelAttribute ApiTrestleDetailRequest params) {
return masterService.getTrestleDetailList(params);
}
}

View File

@ -11,6 +11,7 @@ import com.interplug.qcast.biz.master.dto.ApiTrestleRequest;
import com.interplug.qcast.biz.master.dto.ApiTrestleResponse;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestParam;
// @FeignClient(name = "master", url = "${feign.master.url}")
@ -28,13 +29,13 @@ public interface MasterService {
// 가대 목록 조회
@GetMapping("/trestle")
public ApiResponse<ApiTrestleResponse> getTrestleList(@RequestParam ApiTrestleRequest params);
public ApiResponse<ApiTrestleResponse> getTrestleList(@ModelAttribute ApiTrestleRequest params);
// 시공법 목록 조회
@GetMapping("/construction")
public ApiResponse<ApiConstructionResponse> getConstructionList(@RequestParam ApiConstructionRequest params);
public ApiResponse<ApiConstructionResponse> getConstructionList(@ModelAttribute ApiConstructionRequest params);
// 가대 상세 조회
@GetMapping("/trestle/detail")
public ApiResponse<ApiTrestleDetailResponse> getTrestleDetailList(@RequestParam ApiTrestleDetailRequest params);
public ApiResponse<ApiTrestleDetailResponse> getTrestleDetailList(@ModelAttribute ApiTrestleDetailRequest params);
}