콘텐츠 메인 단편 - 일간랭킹

- 데이터가 5개 미만이면 5개 이상이 될 때까지 랭킹 계산 시작 날짜를 5일씩 이전으로 설정
This commit is contained in:
Klaus 2025-03-19 16:15:27 +09:00
parent 13a1fa674b
commit 1998a95c35
1 changed files with 18 additions and 8 deletions

View File

@ -165,14 +165,24 @@ class AudioContentMainTabContentService(
val dailyRankingEndDate = dailyRankingStartDate
.plusDays(1)
return rankingService.getContentRanking(
memberId = memberId,
isAdult = isAdult,
contentType = contentType,
startDate = dailyRankingStartDate,
endDate = dailyRankingEndDate,
sortType = sortType
)
var loopCount = 0
var contentCount: Int
var contentList: List<GetAudioContentRankingItem>
do {
contentList = rankingService.getContentRanking(
memberId = memberId,
isAdult = isAdult,
contentType = contentType,
startDate = dailyRankingStartDate.minusDays(loopCount * 5L),
endDate = dailyRankingEndDate,
sortType = sortType
)
contentCount = contentList.size
loopCount++
} while (contentCount < 5)
return contentList
}
fun getNewContentByTheme(