콘텐츠 메인 - 채널별 인기 콘텐츠

- 판매개수 순위 Top2 -> Top4로 변경
This commit is contained in:
Klaus 2025-02-17 12:07:21 +09:00
parent 239516b98b
commit dc0902c555
7 changed files with 12 additions and 23 deletions

View File

@ -79,7 +79,7 @@ class AudioContentMainTabAsmrService(
} }
val salesCountRankContentList = if (creatorList.isNotEmpty()) { val salesCountRankContentList = if (creatorList.isNotEmpty()) {
rankingService.fetchCreatorContentBySalesCountTop2( rankingService.fetchCreatorContentBySalesCountTop4(
creatorId = creatorList[0].creatorId, creatorId = creatorList[0].creatorId,
isAdult = isAdult, isAdult = isAdult,
theme = theme theme = theme
@ -122,7 +122,7 @@ class AudioContentMainTabAsmrService(
theme = theme theme = theme
) )
val salesCountRankContentList = rankingService.fetchCreatorContentBySalesCountTop2( val salesCountRankContentList = rankingService.fetchCreatorContentBySalesCountTop4(
creatorId = creatorId, creatorId = creatorId,
isAdult = isAdult, isAdult = isAdult,
theme = theme theme = theme

View File

@ -85,7 +85,7 @@ class AudioContentMainTabContentService(
} }
val salesCountRankContentList = if (contentRankCreatorList.isNotEmpty()) { val salesCountRankContentList = if (contentRankCreatorList.isNotEmpty()) {
rankingService.fetchCreatorContentBySalesCountTop2( rankingService.fetchCreatorContentBySalesCountTop4(
creatorId = contentRankCreatorList[0].creatorId, creatorId = contentRankCreatorList[0].creatorId,
isAdult = member.auth != null isAdult = member.auth != null
) )
@ -150,7 +150,7 @@ class AudioContentMainTabContentService(
isAdult = isAdult isAdult = isAdult
) )
val salesCountRankContentList = rankingService.fetchCreatorContentBySalesCountTop2( val salesCountRankContentList = rankingService.fetchCreatorContentBySalesCountTop4(
creatorId = creatorId, creatorId = creatorId,
isAdult = isAdult isAdult = isAdult
) )

View File

@ -83,17 +83,8 @@ class AudioContentMainTabHomeService(
endDate = endDate endDate = endDate
) )
val salesRankContentList = if (contentRankCreatorList.isNotEmpty()) {
rankingService.fetchCreatorContentBySalesTop2(
creatorId = contentRankCreatorList[0].creatorId,
isAdult = member.auth != null
)
} else {
emptyList()
}
val salesCountRankContentList = if (contentRankCreatorList.isNotEmpty()) { val salesCountRankContentList = if (contentRankCreatorList.isNotEmpty()) {
rankingService.fetchCreatorContentBySalesCountTop2( rankingService.fetchCreatorContentBySalesCountTop4(
creatorId = contentRankCreatorList[0].creatorId, creatorId = contentRankCreatorList[0].creatorId,
isAdult = member.auth != null isAdult = member.auth != null
) )
@ -110,7 +101,6 @@ class AudioContentMainTabHomeService(
rankContentList = rankContentList, rankContentList = rankContentList,
eventBannerList = eventBannerList, eventBannerList = eventBannerList,
contentRankCreatorList = contentRankCreatorList, contentRankCreatorList = contentRankCreatorList,
salesRankContentList = salesRankContentList,
salesCountRankContentList = salesCountRankContentList salesCountRankContentList = salesCountRankContentList
) )
} }
@ -121,7 +111,7 @@ class AudioContentMainTabHomeService(
isAdult = isAdult isAdult = isAdult
) )
val salesCountRankContentList = rankingService.fetchCreatorContentBySalesCountTop2( val salesCountRankContentList = rankingService.fetchCreatorContentBySalesCountTop4(
creatorId = creatorId, creatorId = creatorId,
isAdult = isAdult isAdult = isAdult
) )

View File

@ -18,6 +18,5 @@ data class GetContentMainTabHomeResponse(
val rankContentList: List<GetAudioContentRankingItem>, val rankContentList: List<GetAudioContentRankingItem>,
val eventBannerList: GetEventResponse, val eventBannerList: GetEventResponse,
val contentRankCreatorList: List<ContentCreatorResponse>, val contentRankCreatorList: List<ContentCreatorResponse>,
val salesRankContentList: List<GetAudioContentRankingItem>,
val salesCountRankContentList: List<GetAudioContentRankingItem> val salesCountRankContentList: List<GetAudioContentRankingItem>
) )

View File

@ -79,7 +79,7 @@ class AudioContentMainTabLiveReplayService(
} }
val salesCountRankContentList = if (creatorList.isNotEmpty()) { val salesCountRankContentList = if (creatorList.isNotEmpty()) {
rankingService.fetchCreatorContentBySalesCountTop2( rankingService.fetchCreatorContentBySalesCountTop4(
creatorId = creatorList[0].creatorId, creatorId = creatorList[0].creatorId,
isAdult = isAdult, isAdult = isAdult,
theme = theme theme = theme
@ -122,7 +122,7 @@ class AudioContentMainTabLiveReplayService(
theme = theme theme = theme
) )
val salesCountRankContentList = rankingService.fetchCreatorContentBySalesCountTop2( val salesCountRankContentList = rankingService.fetchCreatorContentBySalesCountTop4(
creatorId = creatorId, creatorId = creatorId,
isAdult = isAdult, isAdult = isAdult,
theme = theme theme = theme

View File

@ -429,7 +429,7 @@ class RankingRepository(
.fetch() .fetch()
} }
fun fetchCreatorContentBySalesCountTop2( fun fetchCreatorContentBySalesCountTop4(
creatorId: Long, creatorId: Long,
isAdult: Boolean, isAdult: Boolean,
theme: String theme: String
@ -473,7 +473,7 @@ class RankingRepository(
.groupBy(audioContent.id) .groupBy(audioContent.id)
.orderBy(order.id.count().desc()) .orderBy(order.id.count().desc())
.offset(0) .offset(0)
.limit(2) .limit(4)
.fetch() .fetch()
} }

View File

@ -197,12 +197,12 @@ class RankingService(
return repository.fetchCreatorContentBySalesTop2(creatorId, isAdult, theme) return repository.fetchCreatorContentBySalesTop2(creatorId, isAdult, theme)
} }
fun fetchCreatorContentBySalesCountTop2( fun fetchCreatorContentBySalesCountTop4(
creatorId: Long, creatorId: Long,
isAdult: Boolean, isAdult: Boolean,
theme: String = "" theme: String = ""
): List<GetAudioContentRankingItem> { ): List<GetAudioContentRankingItem> {
return repository.fetchCreatorContentBySalesCountTop2(creatorId, isAdult, theme) return repository.fetchCreatorContentBySalesCountTop4(creatorId, isAdult, theme)
} }
fun fetchCreatorBySeriesRevenueRankTop20( fun fetchCreatorBySeriesRevenueRankTop20(