diff --git a/src/main/java/briefing/briefing/application/strategy/BriefingV1QueryStrategy.java b/src/main/java/briefing/briefing/application/strategy/BriefingV1QueryStrategy.java index 283feac..15351d7 100644 --- a/src/main/java/briefing/briefing/application/strategy/BriefingV1QueryStrategy.java +++ b/src/main/java/briefing/briefing/application/strategy/BriefingV1QueryStrategy.java @@ -8,6 +8,7 @@ import java.time.LocalDateTime; import java.time.LocalTime; +import java.util.Collections; import java.util.List; import java.util.Optional; @@ -22,7 +23,10 @@ public List findBriefings(BriefingRequestParam.BriefingPreviewListPara final LocalDateTime endDateTime = params.getDate().atTime(LocalTime.MAX); List briefingList = briefingRepository.findAllByTypeAndCreatedAtBetweenOrderByRanks(params.getType(), startDateTime, endDateTime); - if(briefingList.isEmpty()) return briefingRepository.findTop10ByTypeOrderByCreatedAtDesc(BriefingType.SOCIAL); + if(briefingList.isEmpty()) { + briefingList = briefingRepository.findTop10ByTypeOrderByCreatedAtDesc(BriefingType.SOCIAL); + Collections.reverse(briefingList); + } return briefingList; }