콘텐츠 메인 - 인기 콘텐츠 집계날짜 수정 #48

Merged
klaus merged 1 commits from test into main 2023-10-16 13:42:32 +00:00
2 changed files with 5 additions and 5 deletions

View File

@ -477,7 +477,7 @@ class AudioContentQueryRepositoryImpl(private val queryFactory: JPAQueryFactory)
.innerJoin(audioContent.theme, audioContentTheme)
.where(where)
.groupBy(audioContent.id)
.orderBy(order.can.sum().desc())
.orderBy(order.can.sum().desc(), audioContent.createdAt.asc())
.offset(offset)
.limit(limit)
.fetch()

View File

@ -132,11 +132,11 @@ class AudioContentMainService(
val currentDateTime = LocalDateTime.now()
val startDate = currentDateTime
.minusWeeks(1)
.with(TemporalAdjusters.previousOrSame(DayOfWeek.MONDAY))
.withHour(15)
.withMinute(0)
.withSecond(0)
.minusWeeks(1)
.with(TemporalAdjusters.previousOrSame(DayOfWeek.MONDAY))
val endDate = startDate
.plusDays(7)
@ -146,8 +146,8 @@ class AudioContentMainService(
val contentRankingItemList = repository
.getAudioContentRanking(
cloudfrontHost = imageHost,
startDate = startDate,
endDate = endDate,
startDate = startDate.minusDays(1),
endDate = endDate.minusDays(1),
isAdult = isAdult
)