Skip to content

Commit

Permalink
Merge pull request #31 from readyvery/test
Browse files Browse the repository at this point in the history
사장님 쿠폰 최신화
marinesnow34 authored Dec 7, 2023
2 parents 0616e44 + 67cdd41 commit 37adf35
Showing 5 changed files with 9 additions and 0 deletions.
Binary file added .DS_Store
Binary file not shown.
4 changes: 4 additions & 0 deletions src/main/java/com/readyvery/readyverydemo/domain/Foodie.java
Original file line number Diff line number Diff line change
@@ -41,6 +41,10 @@ public class Foodie extends BaseTimeEntity {
@Column(nullable = true)
private String imgUrl;

//순서
@Column(nullable = false)
private Long sequence;

//식품 매진
@Column(nullable = false, columnDefinition = "BOOLEAN default false")
private boolean soldOut;
Original file line number Diff line number Diff line change
@@ -232,6 +232,9 @@ private void applyCancelTosspaymentDto(Order order, TosspaymentDto tosspaymentDt
order.cancelPayStatus();
order.getReceipt().setCancels(tosspaymentDto.getCancels().toString());
order.getReceipt().setStatus(tosspaymentDto.getStatus());
if (order.getCoupon() != null) {
order.getCoupon().setUsed(false);
}
}

private TosspaymentDto requestTossPaymentCancel(String paymentKey, String rejectReason) {
Original file line number Diff line number Diff line change
@@ -18,4 +18,5 @@ public class OrderDto {
private LocalDateTime time;
private String method;
private Long price;
private boolean isCouponUsed;
}
Original file line number Diff line number Diff line change
@@ -31,6 +31,7 @@ private OrderDto toOrderDto(Order order) {
.phone(order.getUserInfo().getPhone())
.price(order.getAmount())
.method(order.getMethod())
.isCouponUsed(order.getCoupon() != null && order.getCoupon().isUsed())
.foodies(order.getCart()
.getCartItems()
.stream()

0 comments on commit 37adf35

Please sign in to comment.