Skip to content

Commit

Permalink
refactor: 관리자 페이지 가독성을 위해 LocalDateTime을 포맷팅해서 String으로 등록 시간을 표현한다.
Browse files Browse the repository at this point in the history
  • Loading branch information
zzoe2346 committed Nov 2, 2024
1 parent e6703e0 commit a3b1a85
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,10 @@

import com.example.sinitto.point.entity.PointLog;

import java.time.LocalDateTime;

public record PointLogWithBankInfo(
Long pointLogId,
int price,
LocalDateTime postTime,
String postTime,
PointLog.Status status,
String bankName,
String bankAccountNumber
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,10 @@

import com.example.sinitto.point.entity.PointLog;

import java.time.LocalDateTime;

public record PointLogWithDepositMessage(
Long pointLogId,
int price,
LocalDateTime postTime,
String postTime,
PointLog.Status status,
String depositMessage
) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.time.format.DateTimeFormatter;
import java.util.ArrayList;
import java.util.List;

Expand Down Expand Up @@ -45,7 +46,7 @@ public List<PointLogWithDepositMessage> getPointLogWithDepositMessage() {
PointLogWithDepositMessage pointLogWithDepositMessage = new PointLogWithDepositMessage(
pointLog.getId(),
pointLog.getPrice(),
pointLog.getPostTime(),
pointLog.getPostTime().format(DateTimeFormatter.ofPattern("yyyy년 MM월 dd일 HH시 mm분")),
pointLog.getStatus(),
member.getDepositMessage()
);
Expand Down Expand Up @@ -132,7 +133,7 @@ public List<PointLogWithBankInfo> getPointLogWithBankInfo() {
PointLogWithBankInfo pointLogWithBankInfo = new PointLogWithBankInfo(
pointLog.getId(),
pointLog.getPointPriceAfterFee(),
pointLog.getPostTime(),
pointLog.getPostTime().format(DateTimeFormatter.ofPattern("yyyy년 MM월 dd일 HH시 mm분")),
pointLog.getStatus(),
sinittoBankInfo.getBankName(),
sinittoBankInfo.getAccountNumber()
Expand Down

0 comments on commit a3b1a85

Please sign in to comment.