generated from pricelees/issue-pr-template
refactor: 회원의 예약 상세 조회시 결제 정보를 nullable로 수정
This commit is contained in:
parent
52230a5ba0
commit
5724aaecb6
@ -34,12 +34,12 @@ data class PaymentRetrieveResponse(
|
|||||||
val status: PaymentStatus,
|
val status: PaymentStatus,
|
||||||
val requestedAt: OffsetDateTime,
|
val requestedAt: OffsetDateTime,
|
||||||
val approvedAt: OffsetDateTime,
|
val approvedAt: OffsetDateTime,
|
||||||
val detail: PaymentDetailResponse,
|
val detail: PaymentDetailResponse?,
|
||||||
val cancel: PaymentCancelDetailResponse?,
|
val cancel: PaymentCancelDetailResponse?,
|
||||||
)
|
)
|
||||||
|
|
||||||
fun PaymentEntity.toRetrieveResponse(
|
fun PaymentEntity.toRetrieveResponse(
|
||||||
detail: PaymentDetailResponse,
|
detail: PaymentDetailResponse?,
|
||||||
cancel: PaymentCancelDetailResponse?
|
cancel: PaymentCancelDetailResponse?
|
||||||
): PaymentRetrieveResponse {
|
): PaymentRetrieveResponse {
|
||||||
return PaymentRetrieveResponse(
|
return PaymentRetrieveResponse(
|
||||||
|
|||||||
@ -118,7 +118,7 @@ class ReservationService(
|
|||||||
|
|
||||||
val reservation: ReservationEntity = findOrThrow(id)
|
val reservation: ReservationEntity = findOrThrow(id)
|
||||||
val user: UserContactRetrieveResponse = userService.findContactById(reservation.userId)
|
val user: UserContactRetrieveResponse = userService.findContactById(reservation.userId)
|
||||||
val paymentDetail: PaymentRetrieveResponse = paymentService.findDetailByReservationId(id)
|
val paymentDetail: PaymentRetrieveResponse? = paymentService.findDetailByReservationId(id)
|
||||||
|
|
||||||
return reservation.toReservationDetailRetrieveResponse(
|
return reservation.toReservationDetailRetrieveResponse(
|
||||||
user = user,
|
user = user,
|
||||||
|
|||||||
@ -50,12 +50,12 @@ data class ReservationDetailRetrieveResponse(
|
|||||||
val id: Long,
|
val id: Long,
|
||||||
val user: UserContactRetrieveResponse,
|
val user: UserContactRetrieveResponse,
|
||||||
val applicationDateTime: LocalDateTime,
|
val applicationDateTime: LocalDateTime,
|
||||||
val payment: PaymentRetrieveResponse,
|
val payment: PaymentRetrieveResponse?,
|
||||||
)
|
)
|
||||||
|
|
||||||
fun ReservationEntity.toReservationDetailRetrieveResponse(
|
fun ReservationEntity.toReservationDetailRetrieveResponse(
|
||||||
user: UserContactRetrieveResponse,
|
user: UserContactRetrieveResponse,
|
||||||
payment: PaymentRetrieveResponse,
|
payment: PaymentRetrieveResponse?,
|
||||||
): ReservationDetailRetrieveResponse {
|
): ReservationDetailRetrieveResponse {
|
||||||
return ReservationDetailRetrieveResponse(
|
return ReservationDetailRetrieveResponse(
|
||||||
id = this.id,
|
id = this.id,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user