Skip to content

Commit 9faa83f

Browse files
authored
Release 1.0.4 (#12)
## 📝 작업 내용 - feature: 주문 결제 원거래일시 yyMMdd 포맷으로 변경 ## 📷 스크린샷 (선택) ## 💬 리뷰 요구사항(선택)
2 parents fe466e3 + 2b4fbc2 commit 9faa83f

File tree

6 files changed

+18
-15
lines changed

6 files changed

+18
-15
lines changed

docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ services:
22
everyonewaiter-api:
33
container_name: everyonewaiter-api
44
build: .
5-
image: everyonewaiter-api:1.0.3
5+
image: everyonewaiter-api:1.0.4
66
ports:
77
- "8081:8081"
88
volumes:

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Artifact
22
appGroup=com.everyonewaiter
3-
appVersion=1.0.3
3+
appVersion=1.0.4
44

55
# Plugin
66
springBoot=3.5.4

src/main/java/com/everyonewaiter/domain/order/OrderPayment.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ public class OrderPayment extends AggregateRootEntity<OrderPayment> {
7777
private String merchantNo; // 카드사/포인트사 가맹점 번호
7878

7979
@Column(name = "trade_time", nullable = false, length = 20)
80-
private String tradeTime; // 거래일시 yyMMddHHmmss
80+
private String tradeTime; // 거래일시 yyMMdd
8181

8282
@Column(name = "trade_unique_no", nullable = false, length = 30)
8383
private String tradeUniqueNo; // 거래 고유 번호
@@ -88,7 +88,7 @@ public class OrderPayment extends AggregateRootEntity<OrderPayment> {
8888
@Column(name = "supply_amount", nullable = false)
8989
private long supplyAmount; // 공급가액
9090

91-
@Column(name = "cash_receipt_no", nullable = true, length = 30)
91+
@Column(name = "cash_receipt_no", nullable = false, length = 30)
9292
private String cashReceiptNo; // 현금 영수증 번호
9393

9494
@Enumerated(EnumType.STRING)

src/main/java/com/everyonewaiter/domain/order/OrderPaymentApproveRequest.java

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,9 @@ public record OrderPaymentApproveRequest(
4444
@NotNull(message = "카드사/포인트사 가맹점 번호이 누락되었습니다.")
4545
String merchantNo,
4646

47-
@Schema(description = "카드 거래일시 YYMMDDHHmmss", example = "250101120000", requiredMode = REQUIRED)
47+
@Schema(description = "카드 거래일시 yyMMdd", example = "250101", requiredMode = REQUIRED)
4848
@NotNull(message = "카드 거래일시가 누락되었습니다.")
49+
@Size(max = 6, message = "카드 거래일시는 최대 6자 이하로 입력해 주세요.")
4950
String tradeTime,
5051

5152
@Schema(description = "카드 거래 고유 번호", example = "1234567890", requiredMode = REQUIRED)
@@ -71,15 +72,15 @@ public record OrderPaymentApproveRequest(
7172
CashReceiptType cashReceiptType
7273
) {
7374

74-
public boolean isCard() {
75+
private boolean isCard() {
7576
return method == OrderPaymentMethod.CARD;
7677
}
7778

78-
public boolean isCash() {
79+
private boolean isCash() {
7980
return method == OrderPaymentMethod.CASH;
8081
}
8182

82-
public boolean isPureCash() {
83+
private boolean isPureCash() {
8384
return isCash() && cashReceiptType == CashReceiptType.NONE;
8485
}
8586

@@ -115,7 +116,7 @@ public String merchantNo() {
115116

116117
@Override
117118
public String tradeTime() {
118-
return isPureCash() ? DateFormatter.formatCurrentKstTime() : tradeTime;
119+
return isPureCash() ? DateFormatter.getSimpleKstDate() : tradeTime;
119120
}
120121

121122
@Override

src/main/java/com/everyonewaiter/domain/order/OrderPaymentCancelRequest.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,17 @@
55
import com.everyonewaiter.domain.support.DateFormatter;
66
import io.swagger.v3.oas.annotations.media.Schema;
77
import jakarta.validation.constraints.NotNull;
8+
import jakarta.validation.constraints.Size;
89

910
@Schema(name = "OrderPaymentCancelRequest")
1011
public record OrderPaymentCancelRequest(
1112
@Schema(description = "카드 결제 승인 번호", example = "1234567890", requiredMode = REQUIRED)
1213
@NotNull(message = "카드 결제 승인 번호가 누락되었습니다.")
1314
String approvalNo,
1415

15-
@Schema(description = "카드 거래일시 YYMMDDHHmmss", example = "250101120000", requiredMode = REQUIRED)
16+
@Schema(description = "카드 거래일시 yyMMdd", example = "250101", requiredMode = REQUIRED)
1617
@NotNull(message = "카드 거래일시가 누락되었습니다.")
18+
@Size(max = 6, message = "카드 거래일시는 최대 6자 이하로 입력해 주세요.")
1719
String tradeTime,
1820

1921
@Schema(description = "카드 거래 고유 번호", example = "1234567890", requiredMode = REQUIRED)
@@ -26,7 +28,7 @@ public String approvalNo(boolean isPureCash) {
2628
}
2729

2830
public String tradeTime(boolean isPureCash) {
29-
return isPureCash ? DateFormatter.formatCurrentKstTime() : tradeTime;
31+
return isPureCash ? DateFormatter.getSimpleKstDate() : tradeTime;
3032
}
3133

3234
public String tradeUniqueNo(boolean isPureCash) {

src/main/java/com/everyonewaiter/domain/support/DateFormatter.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,15 @@ public final class DateFormatter {
1111

1212
public static final DateTimeFormatter SERIALIZE =
1313
DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
14+
public static final DateTimeFormatter SIMPLE_YEAR_MONTH_DAY =
15+
DateTimeFormatter.ofPattern("yyMMdd");
1416
public static final DateTimeFormatter YEAR_MONTH = DateTimeFormatter.ofPattern("yyyyMM");
1517
public static final DateTimeFormatter YEAR_MONTH_DAY = DateTimeFormatter.ofPattern("yyyyMMdd");
16-
public static final DateTimeFormatter YEAR_MONTH_DAY_HOUR_MINUTE_SECOND =
17-
DateTimeFormatter.ofPattern("yyMMddHHmmss");
1818

19-
public static String formatCurrentKstTime() {
19+
public static String getSimpleKstDate() {
2020
LocalDateTime now = LocalDateTime.now(TimeZone.ASIA_SEOUL.zoneId());
2121

22-
return now.format(YEAR_MONTH_DAY_HOUR_MINUTE_SECOND);
22+
return now.format(SIMPLE_YEAR_MONTH_DAY);
2323
}
2424

2525
}

0 commit comments

Comments
 (0)