feat(chat-character): 보온 주간 차트 콘텐츠 정렬 기준 추가

- 매출, 판매량, 댓글 수, 좋아요 수, 후원
This commit is contained in:
2025-11-11 23:02:58 +09:00
parent 16b6c13309
commit fe76ecdfa9
5 changed files with 135 additions and 1 deletions

View File

@@ -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,