Skip to content

Commit

Permalink
Merge pull request #282 from wafflestudio/develop
Browse files Browse the repository at this point in the history
  • Loading branch information
huGgW authored May 20, 2024
2 parents ea23f00 + a02a406 commit bfcd366
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ import java.time.LocalDateTime

interface NewsRepository : JpaRepository<NewsEntity, Long>, CustomNewsRepository {
fun findAllByIsPrivateFalseAndIsImportantTrueAndIsDeletedFalse(): List<NewsEntity>
fun findAllByIsImportantTrueAndIsDeletedFalse(): List<NewsEntity>
fun findFirstByIsDeletedFalseAndIsPrivateFalseAndCreatedAtLessThanOrderByCreatedAtDesc(
timestamp: LocalDateTime
): NewsEntity?
Expand Down Expand Up @@ -123,7 +122,7 @@ class NewsRepositoryImpl(

val newsEntityList = when {
sortBy == ContentSearchSortType.DATE || keyword.isNullOrEmpty() -> newsEntityQuery.orderBy(
newsEntity.createdAt.desc()
newsEntity.date.desc()
)

else /* sortBy == RELEVANCE */ -> newsEntityQuery
Expand Down

0 comments on commit bfcd366

Please sign in to comment.