-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* [ARV-146] fix: 차량 대절 폼 상세 조회 시 가용 날짜, 참여자 수를 DTO로 따로 분리해서 List로 조회하도록 수정 * [ARV-146] style: 코드 간격, 빈칸 수정 * [ARV-146] fix: RentDetailResponse 조회 시 날짜 별 참여자 수 조회하도록 수정 * [ARV-146] feat: 차량 대절 관리 리스트 페이지 조회 개선 * [ARV-146] fix: 차량 대절 관리 페이지 조회 로직 개선 - 페이지 조회 겹치는 부분 재사용 * [ARV-146] fix: 자신이 참가한 차 대절 리스트 조회 로직 개선 - 하나의 DTO로 조회하도록 수정 * [ARV-146] style: 빈 줄 삭제 * [ARV-146] feat: 차량 대절 삭제 구현 * [ARV-146] refactor: 차량 대절 API swagger ui 개선 * [ARV-146] fix: 이용 구분 및 입금 처리 인원 조회 groupby 추가 * [ARV-146] fix: RentRegisterRequest rentBoardingDateRequests -> boardingDates json 수정 * [ARV-146] fix: RentJoin command 요청 body 순서 및 유효성 검사 적용 * [ARV-146] fix: Rent command 요청 유효성 검사 적용 * [ARV-146] fix: toRentBoardingDates() 메서드 제거 * [ARV-146] test: Request 매개변수 순서 수정 * [ARV-146] fix: 차 대절 메인 페이지 조회 쿼리 개선
- Loading branch information
Showing
37 changed files
with
651 additions
and
518 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 7 additions & 1 deletion
8
src/main/java/com/backend/allreva/rent/command/application/request/RentIdRequest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,10 @@ | ||
package com.backend.allreva.rent.command.application.request; | ||
|
||
public record RentIdRequest(Long rentId) { | ||
import jakarta.validation.constraints.NotNull; | ||
|
||
public record RentIdRequest( | ||
@NotNull | ||
Long rentId | ||
) { | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 23 additions & 9 deletions
32
src/main/java/com/backend/allreva/rent/command/application/request/RentUpdateRequest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,53 @@ | ||
package com.backend.allreva.rent.command.application.request; | ||
|
||
import com.backend.allreva.rent.command.domain.RentBoardingDate; | ||
import com.backend.allreva.rent.command.domain.value.BusSize; | ||
import com.backend.allreva.rent.command.domain.value.BusType; | ||
import com.backend.allreva.rent_join.command.domain.value.RefundType; | ||
import com.backend.allreva.rent.command.domain.value.Region; | ||
import com.backend.allreva.rent_join.command.domain.value.RefundType; | ||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
import jakarta.validation.constraints.FutureOrPresent; | ||
import jakarta.validation.constraints.Min; | ||
import jakarta.validation.constraints.NotEmpty; | ||
import jakarta.validation.constraints.NotNull; | ||
import jakarta.validation.constraints.PositiveOrZero; | ||
import java.time.LocalDate; | ||
import java.util.List; | ||
|
||
public record RentUpdateRequest( | ||
@NotNull | ||
Long rentId, | ||
String imageUrl, | ||
@NotNull | ||
Region region, // enum 파싱 | ||
@NotNull | ||
String boardingArea, | ||
@NotNull | ||
String upTime, | ||
@NotNull | ||
String downTime, | ||
@NotEmpty(message = "날짜는 하루 이상 선택되어야 합니다.") | ||
@JsonProperty("boardingDates") | ||
List<LocalDate> rentBoardingDateRequests, | ||
@NotNull | ||
BusSize busSize, // enum | ||
@NotNull | ||
BusType busType, // enum | ||
@Min(value = 1, message = "탑승 인원 수는 1명 이상이어야 합니다.") | ||
int maxPassenger, | ||
@PositiveOrZero | ||
int roundPrice, | ||
@PositiveOrZero | ||
int upTimePrice, | ||
@PositiveOrZero | ||
int downTimePrice, | ||
@Min(value = 1, message = "모집 인원 수는 1명 이상이어야 합니다.") | ||
int recruitmentCount, | ||
@FutureOrPresent(message = "마감 기한은 과거일 수 없습니다.") | ||
LocalDate endDate, | ||
String chatUrl, | ||
@NotNull | ||
RefundType refundType, //enum | ||
String information | ||
) { | ||
|
||
public List<RentBoardingDate> toRentBoardingDates() { | ||
return rentBoardingDateRequests.stream() | ||
.map(request -> RentBoardingDate.builder() | ||
.date(request) | ||
.build()) | ||
.toList(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.