From 737586b68693bfcc72ddd754a4c88d6f2263d3d3 Mon Sep 17 00:00:00 2001 From: Jude Date: Sat, 21 Sep 2024 17:46:28 +0900 Subject: [PATCH] =?UTF-8?q?=ED=8F=AC=ED=86=A0=EB=B6=81=20=EC=A0=95?= =?UTF-8?q?=EB=A0=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../kotlin/com/ggsdh/backend/trip/application/LikeService.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/kotlin/com/ggsdh/backend/trip/application/LikeService.kt b/src/main/kotlin/com/ggsdh/backend/trip/application/LikeService.kt index 37a4e25..6a797d6 100644 --- a/src/main/kotlin/com/ggsdh/backend/trip/application/LikeService.kt +++ b/src/main/kotlin/com/ggsdh/backend/trip/application/LikeService.kt @@ -17,12 +17,12 @@ class LikeService( ) { fun getAllLikedTourAreaIdsByMember(memberId: Long): List { val likes = likeRepository.findAllByMemberId(memberId) - return likes.filter { it.tourAreaId != null }.map { it.tourAreaId!! } + return likes.sortedByDescending { it.id }.filter { it.tourAreaId != null }.map { it.tourAreaId!! } } fun getAllLikedLaneIdsByMember(memberId: Long): List { val likes = likeRepository.findAllByMemberId(memberId) - return likes.filter { it.laneId != null }.map { it.laneId!! } + return likes.sortedByDescending { it.id }.filter { it.laneId != null }.map { it.laneId!! } } @Transactional