Skip to content

Commit

Permalink
feat: 주차장 목록 조회 시 조회 조건 엔티티로 대체 가능한 query param 제거
Browse files Browse the repository at this point in the history
  • Loading branch information
youngh0 committed Mar 13, 2024
1 parent 28ce548 commit 6b7459f
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,25 +5,13 @@
@Getter
public class ParkingQueryRequest {

private final String operationType;
private final String parkingType;
private final String feeType;
private final Boolean cardEnabled;
private final String priority;
private final Integer hours;
private final Double latitude;
private final Double longitude;
private final Integer radius;

public ParkingQueryRequest(String operationType, String parkingType, String feeType, Boolean cardEnabled,
String priority,
Integer hours, Double latitude, Double longitude, Integer radius) {
this.operationType = operationType;
this.parkingType = parkingType;
this.feeType = feeType;
this.cardEnabled = cardEnabled;
public ParkingQueryRequest(String priority, Double latitude, Double longitude, Integer radius) {
this.priority = priority;
this.hours = hours;
this.latitude = latitude;
this.longitude = longitude;
this.radius = radius;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,7 @@ public boolean supportsParameter(MethodParameter parameter) {
public Object resolveArgument(MethodParameter parameter, ModelAndViewContainer mavContainer,
NativeWebRequest webRequest, WebDataBinderFactory binderFactory) {
return new ParkingQueryRequest(
webRequest.getParameter("operationType"),
webRequest.getParameter("parkingType"),
webRequest.getParameter("feeType"),
Boolean.parseBoolean(webRequest.getParameter("cardEnabled")),
webRequest.getParameter("priority"),
Integer.parseInt(webRequest.getParameter("hours")),
Double.valueOf(webRequest.getParameter("latitude")),
Double.valueOf(webRequest.getParameter("longitude")),
Integer.parseInt(webRequest.getParameter("radius"))
Expand Down

0 comments on commit 6b7459f

Please sign in to comment.