Skip to content

Commit

Permalink
Merge pull request #30 from marinesnow34/test
Browse files Browse the repository at this point in the history
Feat: 가게 메뉴 순서 추가
marinesnow34 authored Dec 7, 2023
2 parents 8338d96 + 7bc669c commit 67cdd41
Showing 5 changed files with 12 additions and 3 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;
3 changes: 3 additions & 0 deletions src/main/java/com/readyvery/readyverydemo/domain/Store.java
Original file line number Diff line number Diff line change
@@ -73,6 +73,9 @@ public class Store extends BaseTimeEntity {
@Enumerated(EnumType.STRING)
private Grade grade;

@Column
private String account;

//가게 사장님 연관관계 매핑
@OneToMany(mappedBy = "store")
private List<CeoInfo> ceoInfos = new ArrayList<CeoInfo>();
Original file line number Diff line number Diff line change
@@ -25,7 +25,7 @@ public CeoInfoRes ceoInfoToCeoInfoRes(CeoInfo ceoInfo) {
.address(ceoInfo.getStore().getAddress())
.phone(ceoInfo.getPhone())
.openTime(ceoInfo.getStore().getTime())
.account(ceoInfo.getAccountNumber())
.account(ceoInfo.getStore().getAccount())
.build();
}
}
Original file line number Diff line number Diff line change
@@ -103,7 +103,7 @@ private HashMap<String, String> makeCompeleteVariables(Order order) {
HashMap<String, String> variables = new HashMap<>();
variables.put("#{storeName}", order.getStore().getName());
variables.put("#{orderName}", order.getOrderName());
variables.put("#{orderNumber}", order.getOrderId());
variables.put("#{orderNumber}", order.getOrderNumber());
variables.put("#{orderId}", order.getOrderId());
return variables;
}
@@ -153,7 +153,6 @@ private HashMap<String, String> makeCancelVariables(Order order, String rejectRe
HashMap<String, String> variables = new HashMap<>();
variables.put("#{storeName}", order.getStore().getName());
variables.put("#{orderName}", order.getOrderName());
variables.put("#{orderNumber}", order.getOrderId());
variables.put("#{cancelReason}", rejectReason);
return variables;
}
@@ -233,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) {

0 comments on commit 67cdd41

Please sign in to comment.