-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
141 additions
and
75 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
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
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 |
---|---|---|
@@ -0,0 +1,95 @@ | ||
package org.example.dto; | ||
|
||
import lombok.Getter; | ||
import lombok.Setter; | ||
import org.example.entity.DeliveryType; | ||
import org.example.entity.Order; | ||
import org.example.entity.OrderCustomerType; | ||
import org.example.entity.PaymentMethod; | ||
|
||
import java.time.LocalDateTime; | ||
|
||
@Getter | ||
@Setter | ||
public class OrderResponse { | ||
private long id; | ||
|
||
private String orderName; | ||
|
||
private String orderNumber; | ||
|
||
private Long totalOriginalPrice; | ||
|
||
private Long totalDiscountPrice; | ||
|
||
private Long productDiscountPrice; | ||
|
||
private Long pointDiscountPrice; | ||
|
||
private Long couponDiscountPrice; | ||
|
||
private Long deliveryFee; | ||
|
||
private PaymentMethod paymentMethod; | ||
|
||
private OrderCustomerType orderCustomerType; | ||
|
||
private DeliveryType deliveryType; | ||
|
||
private String refundBankAccount; | ||
|
||
private String refundAccountBankName; | ||
|
||
private String refundAccountHolder; | ||
|
||
private String deliveryMessage; | ||
|
||
private String deliveryPhoneNumber; | ||
|
||
private String receiver; | ||
|
||
private String streetAddress; | ||
|
||
private String detailAddress; | ||
|
||
private String zipCode; | ||
|
||
private LocalDateTime paymentDate; | ||
|
||
private String customerEmail; | ||
|
||
private String customerName; | ||
|
||
private String customerPhoneNumber; | ||
|
||
private String customerPersonalCustomsCode; | ||
|
||
|
||
public OrderResponse(Order order) { | ||
this.id = order.getId(); | ||
this.orderName = order.getOrderName(); | ||
this.orderNumber = order.getOrderNumber(); | ||
this.totalOriginalPrice = order.getTotalOriginalPrice(); | ||
this.totalDiscountPrice = order.getTotalDiscountPrice(); | ||
this.productDiscountPrice = order.getProductDiscountPrice(); | ||
this.pointDiscountPrice = order.getPointDiscountPrice(); | ||
this.couponDiscountPrice = order.getCouponDiscountPrice(); | ||
this.deliveryFee = order.getDeliveryFee(); | ||
this.paymentMethod = order.getPaymentMethod(); | ||
this.orderCustomerType = order.getOrderCustomerType(); | ||
this.deliveryType = order.getDeliveryType(); | ||
this.refundBankAccount = order.getRefundBankAccount(); | ||
this.refundAccountBankName = order.getRefundAccountBankName(); | ||
this.refundAccountHolder = order.getRefundAccountHolder(); | ||
this.deliveryMessage = order.getDeliveryMessage(); | ||
this.deliveryPhoneNumber = order.getDeliveryPhoneNumber(); | ||
this.receiver = order.getReceiver(); | ||
this.streetAddress = order.getStreetAddress(); | ||
this.detailAddress = order.getDetailAddress(); | ||
this.paymentDate = order.getPaymentDate(); | ||
this.customerEmail = order.getCustomerEmail(); | ||
this.customerName = order.getCustomerName(); | ||
this.customerPhoneNumber = order.getCustomerPhoneNumber(); | ||
this.customerPersonalCustomsCode = order.getCustomerPersonalCustomsCode(); | ||
} | ||
} |
11 changes: 7 additions & 4 deletions
11
web/src/main/java/org/example/interceptor/RequestHeaderInterceptor.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
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
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
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,10 +1,9 @@ | ||
type Mutation { | ||
createMemberOrderV3(input: CreateOrderV3Input!): CreateOrderV3Output! | ||
confirmMemberOrder(input: ConfirmMemberOrderInput!): ConfirmMemberOrderOutput! | ||
} | ||
|
||
type Query { | ||
order(input: MemberOrderInput!): MemberOrderOutput! | ||
healthCheck: String! | ||
} | ||
|
||
scalar DateTime |
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