Skip to content

Commit

Permalink
refactor/#137 : ♻️ 3.2 가게 상세 정보 조회 가게 히스토리 ASC -> DESC로 변경
Browse files Browse the repository at this point in the history
Signed-off-by: EunJiJung <[email protected]>
  • Loading branch information
bianbbc87 committed Nov 23, 2024
1 parent 45b495d commit 10ee4f9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public ReadStoreDetailResponseDto execute(Long id) {
totalShareCount
);

List<StoreHistory> storeHistories = storeHistoryRepository.findByStoreOrderByActionDateAsc(store);
List<StoreHistory> storeHistories = storeHistoryRepository.findByStoreOrderByActionDateDesc(store);

// 그룹화: actionDate를 기준으로 그룹화
Map<String, List<StoreHistory>> groupedByYearMonth = storeHistories.stream()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@

@Repository
public interface StoreHistoryRepository extends JpaRepository<StoreHistory, Long> {
List<StoreHistory> findByStoreOrderByActionDateAsc(Store store);
List<StoreHistory> findByStoreOrderByActionDateDesc(Store store);
}

0 comments on commit 10ee4f9

Please sign in to comment.