feat(chat-character): 보온 주간 차트 콘텐츠 정렬 기준 추가
- 매출, 판매량, 댓글 수, 좋아요 수, 후원
This commit is contained in:
@@ -76,6 +76,38 @@ class RankingService(
|
||||
return contentList
|
||||
}
|
||||
|
||||
private fun toSortString(sort: ContentRankingSortType): String = when (sort) {
|
||||
ContentRankingSortType.REVENUE -> "매출"
|
||||
ContentRankingSortType.SALES_COUNT -> "판매량"
|
||||
ContentRankingSortType.COMMENT_COUNT -> "댓글"
|
||||
ContentRankingSortType.LIKE_COUNT -> "좋아요"
|
||||
ContentRankingSortType.DONATION -> "후원"
|
||||
}
|
||||
|
||||
fun getContentRanking(
|
||||
memberId: Long?,
|
||||
isAdult: Boolean,
|
||||
contentType: ContentType,
|
||||
startDate: LocalDateTime,
|
||||
endDate: LocalDateTime,
|
||||
offset: Long = 0,
|
||||
limit: Long = 12,
|
||||
sort: ContentRankingSortType,
|
||||
theme: String = ""
|
||||
): List<GetAudioContentRankingItem> {
|
||||
return getContentRanking(
|
||||
memberId = memberId,
|
||||
isAdult = isAdult,
|
||||
contentType = contentType,
|
||||
startDate = startDate,
|
||||
endDate = endDate,
|
||||
offset = offset,
|
||||
limit = limit,
|
||||
sortType = toSortString(sort),
|
||||
theme = theme
|
||||
)
|
||||
}
|
||||
|
||||
fun getSeriesRanking(
|
||||
memberId: Long?,
|
||||
isAdult: Boolean,
|
||||
|
||||
Reference in New Issue
Block a user