Skip to content

Commit

Permalink
๐ŸŽจ Style[#28]: ์ฝ”๋ฉ˜ํŠธ ๋ฐ˜์˜
Browse files Browse the repository at this point in the history
  • Loading branch information
ryuwon2407 committed Nov 22, 2024
1 parent 4ec0150 commit 80bec94
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public static PaylistInfo of(Paylist paylist, Store store){
return PaylistInfo.builder()
.paylistId(String.valueOf(paylist.getId()))
.amount((int)paylist.getValue())
.amount(Integer.valueOf(store.getName()))
.storeName(store.getName())
.createAt(paylist.getCreatedAt())
.build();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ public PayNotFoundException(String message) {
}

public PayNotFoundException() {
super("Pay not found for user.");
super("ํ•ด๋‹น ํŽ˜์ด๋ฅผ ์ฐพ์ง€ ๋ชปํ–ˆ์Šต๋‹ˆ๋‹ค.");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ public record CardInfo(
Integer point,
String customImage
) {
public static CardInfo of(Card card) {
public static CardInfo from(Card card) {
return CardInfo.builder()
.cardId(String.valueOf(card.getId()))
.region(card.getArea().getRegionName())
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/com/groom/swipo/domain/point/entity/Card.java
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public class Card extends BaseEntity {

@Column(nullable = false)
@ColumnDefault("0")
private Integer totalPoint = 0;
private Integer totalPoint;

@Column(nullable = false)
private String customImage;
Expand All @@ -61,7 +61,7 @@ public class Card extends BaseEntity {
private Card(User user, String customImage, Area area) {
this.user = user;
this.contents = "";
this.totalPoint = 0; // ์ƒ์„ฑ์ž์—์„œ ๋ช…์‹œ์ ์œผ๋กœ ๊ธฐ๋ณธ๊ฐ’ ์„ค์ •
this.totalPoint = 0; //default 0
this.customImage = customImage;
this.area = area;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public PointHomeResponse getHome(Principal principal) {
// ์‚ฌ์šฉ์ž ์นด๋“œ ์ •๋ณด ์กฐํšŒ
List<Card> cards = cardRepository.findAllByUser(user);
List<CardInfo> cardInfos = cards.stream()
.map(CardInfo::of)
.map(CardInfo::from)
.toList();

// ์ตœ๊ทผ ํŽ˜์ด ๊ฑฐ๋ž˜ ๋‚ด์—ญ ์กฐํšŒ (์ตœ๋Œ€ 5๊ฐœ)
Expand Down

0 comments on commit 80bec94

Please sign in to comment.