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 requestedAt: OffsetDateTime,
|
||||
val approvedAt: OffsetDateTime,
|
||||
val detail: PaymentDetailResponse,
|
||||
val detail: PaymentDetailResponse?,
|
||||
val cancel: PaymentCancelDetailResponse?,
|
||||
)
|
||||
|
||||
fun PaymentEntity.toRetrieveResponse(
|
||||
detail: PaymentDetailResponse,
|
||||
detail: PaymentDetailResponse?,
|
||||
cancel: PaymentCancelDetailResponse?
|
||||
): PaymentRetrieveResponse {
|
||||
return PaymentRetrieveResponse(
|
||||
|
||||
@ -118,7 +118,7 @@ class ReservationService(
|
||||
|
||||
val reservation: ReservationEntity = findOrThrow(id)
|
||||
val user: UserContactRetrieveResponse = userService.findContactById(reservation.userId)
|
||||
val paymentDetail: PaymentRetrieveResponse = paymentService.findDetailByReservationId(id)
|
||||
val paymentDetail: PaymentRetrieveResponse? = paymentService.findDetailByReservationId(id)
|
||||
|
||||
return reservation.toReservationDetailRetrieveResponse(
|
||||
user = user,
|
||||
|
||||
@ -50,12 +50,12 @@ data class ReservationDetailRetrieveResponse(
|
||||
val id: Long,
|
||||
val user: UserContactRetrieveResponse,
|
||||
val applicationDateTime: LocalDateTime,
|
||||
val payment: PaymentRetrieveResponse,
|
||||
val payment: PaymentRetrieveResponse?,
|
||||
)
|
||||
|
||||
fun ReservationEntity.toReservationDetailRetrieveResponse(
|
||||
user: UserContactRetrieveResponse,
|
||||
payment: PaymentRetrieveResponse,
|
||||
payment: PaymentRetrieveResponse?,
|
||||
): ReservationDetailRetrieveResponse {
|
||||
return ReservationDetailRetrieveResponse(
|
||||
id = this.id,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user