Skip to content

Commit

Permalink
hofix: 값이 같은 경우에 대한 추가 정렬 조건 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
TaeyeonRoyce committed Oct 16, 2024
1 parent 897317c commit e5262a1
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class CustomCelebrityRestaurantRepositoryImpl(
override fun findRestaurantsByCelebrityId(
celebrityId: Long,
pageable: Pageable,
sortCondition: ReadCelebrityVisitedRestaurantSortCondition,
sort: ReadCelebrityVisitedRestaurantSortCondition,
): Slice<RestaurantJpaEntity> {
val findSlice = executor.findSlice(pageable) {
select(
Expand All @@ -35,7 +35,7 @@ class CustomCelebrityRestaurantRepositoryImpl(
.path(CelebrityJpaEntity::id)
.eq(celebrityId),
).orderBy(
when (sortCondition) {
when (sort) {
CREATED_AT -> {
path(CelebrityRestaurantJpaEntity::createdAt).desc()
}
Expand All @@ -48,8 +48,8 @@ class CustomCelebrityRestaurantRepositoryImpl(
path(RestaurantJpaEntity::likeCount).desc()
}
},

)
path(CelebrityRestaurantJpaEntity::id).desc()
)
}
val restaurants = findSlice.content.filterNotNull()
return SliceImpl(
Expand Down

0 comments on commit e5262a1

Please sign in to comment.