콘텐츠 메인 단편 - 일간랭킹
- 데이터가 5개 미만이면 5개 이상이 될 때까지 랭킹 계산 시작 날짜를 5일씩 이전으로 설정
This commit is contained in:
parent
13a1fa674b
commit
1998a95c35
|
@ -165,14 +165,24 @@ class AudioContentMainTabContentService(
|
|||
val dailyRankingEndDate = dailyRankingStartDate
|
||||
.plusDays(1)
|
||||
|
||||
return rankingService.getContentRanking(
|
||||
var loopCount = 0
|
||||
var contentCount: Int
|
||||
var contentList: List<GetAudioContentRankingItem>
|
||||
|
||||
do {
|
||||
contentList = rankingService.getContentRanking(
|
||||
memberId = memberId,
|
||||
isAdult = isAdult,
|
||||
contentType = contentType,
|
||||
startDate = dailyRankingStartDate,
|
||||
startDate = dailyRankingStartDate.minusDays(loopCount * 5L),
|
||||
endDate = dailyRankingEndDate,
|
||||
sortType = sortType
|
||||
)
|
||||
contentCount = contentList.size
|
||||
loopCount++
|
||||
} while (contentCount < 5)
|
||||
|
||||
return contentList
|
||||
}
|
||||
|
||||
fun getNewContentByTheme(
|
||||
|
|
Loading…
Reference in New Issue