Skip to content

Commit

Permalink
fix: 보낸 선물박스를 giftBox의 updatedAt을 기준으로 정렬
Browse files Browse the repository at this point in the history
  • Loading branch information
leeeeeyeon committed Feb 23, 2024
1 parent ddffaed commit c1e293f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public static GiftBoxesResponse of(GiftBox giftBox) {
.sender(giftBox.getSenderName())
.receiver(giftBox.getReceiverName())
.name(giftBox.getName())
.giftBoxDate(giftBox.getCreatedAt())
.giftBoxDate(giftBox.getUpdatedAt())
.boxNormal(giftBox.getBox().getNormalImgUrl())
.build();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ private List<GiftBox> getSentGiftBoxes(Member member, LocalDateTime lastGiftBoxD
giftBox.sender.eq(member),
giftBox.senderDeleted.eq(false),
giftBox.deliverStatus.eq(DeliverStatus.DELIVERED))
.orderBy(giftBox.createdAt.desc())
.orderBy(giftBox.updatedAt.desc())
.limit(pageable.getPageSize() + 1L)
.fetch();
}
Expand All @@ -108,7 +108,7 @@ private BooleanExpression ltGiftBoxDate(LocalDateTime giftBoxDate) {
return null;
}

return giftBox.createdAt.lt(giftBoxDate);
return giftBox.updatedAt.lt(giftBoxDate);

Check warning on line 111 in packy-domain/src/main/java/com/dilly/gift/dao/querydsl/GiftBoxQueryRepository.java

View check run for this annotation

Codecov / codecov/patch

packy-domain/src/main/java/com/dilly/gift/dao/querydsl/GiftBoxQueryRepository.java#L111

Added line #L111 was not covered by tests
}

private BooleanExpression ltReceivedDate(LocalDateTime giftBoxDate) {
Expand Down

0 comments on commit c1e293f

Please sign in to comment.