Merge pull request '콘텐츠 메인 - 인기 콘텐츠 집계날짜 수정' (#48) from test into main

Reviewed-on: #48
This commit is contained in:
klaus 2023-10-16 13:42:31 +00:00
commit 7444b41f60
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) .innerJoin(audioContent.theme, audioContentTheme)
.where(where) .where(where)
.groupBy(audioContent.id) .groupBy(audioContent.id)
.orderBy(order.can.sum().desc()) .orderBy(order.can.sum().desc(), audioContent.createdAt.asc())
.offset(offset) .offset(offset)
.limit(limit) .limit(limit)
.fetch() .fetch()

View File

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