콘텐츠 메인 홈 - 인기 단편
- 데이터가 5개 미만이면 5개 이상이 될 때까지 랭킹 계산 시작 날짜를 1주일 씩 이전으로 설정
This commit is contained in:
parent
1998a95c35
commit
46321dd3c1
|
@ -166,7 +166,6 @@ class AudioContentMainTabContentService(
|
|||
.plusDays(1)
|
||||
|
||||
var loopCount = 0
|
||||
var contentCount: Int
|
||||
var contentList: List<GetAudioContentRankingItem>
|
||||
|
||||
do {
|
||||
|
@ -178,9 +177,8 @@ class AudioContentMainTabContentService(
|
|||
endDate = dailyRankingEndDate,
|
||||
sortType = sortType
|
||||
)
|
||||
contentCount = contentList.size
|
||||
loopCount++
|
||||
} while (contentCount < 5)
|
||||
} while (contentList.size < 5)
|
||||
|
||||
return contentList
|
||||
}
|
||||
|
|
|
@ -49,17 +49,25 @@ class RankingService(
|
|||
sortType: String = "매출",
|
||||
theme: String = ""
|
||||
): List<GetAudioContentRankingItem> {
|
||||
return repository.getAudioContentRanking(
|
||||
var loopCount = 0L
|
||||
var contentList: List<GetAudioContentRankingItem>
|
||||
|
||||
do {
|
||||
contentList = repository.getAudioContentRanking(
|
||||
memberId = memberId,
|
||||
isAdult = isAdult,
|
||||
contentType = contentType,
|
||||
startDate = startDate,
|
||||
startDate = startDate.minusWeeks(loopCount),
|
||||
endDate = endDate,
|
||||
offset = offset,
|
||||
limit = limit,
|
||||
sortType = sortType,
|
||||
theme = theme
|
||||
)
|
||||
loopCount++
|
||||
} while (contentList.size < 5)
|
||||
|
||||
return contentList
|
||||
}
|
||||
|
||||
fun getSeriesRanking(
|
||||
|
|
Loading…
Reference in New Issue