콘텐츠 메인 다시듣기, ASMR

- 채널별 콘텐츠 조회 API 추가
This commit is contained in:
2025-02-15 02:01:59 +09:00
parent 34452525d4
commit 3d1716d847
9 changed files with 236 additions and 6 deletions

View File

@@ -381,7 +381,11 @@ class RankingRepository(
.fetch()
}
fun fetchCreatorContentBySalesTop2(creatorId: Long, isAdult: Boolean): List<GetAudioContentRankingItem> {
fun fetchCreatorContentBySalesTop2(
creatorId: Long,
isAdult: Boolean,
theme: String
): List<GetAudioContentRankingItem> {
var where = member.isActive.isTrue
.and(member.role.eq(MemberRole.CREATOR))
.and(audioContent.isActive.isTrue)
@@ -395,6 +399,10 @@ class RankingRepository(
where = where.and(series.isAdult.isFalse)
}
if (theme.isNotBlank()) {
where = where.and(audioContentTheme.theme.eq(theme))
}
return queryFactory
.select(
QGetAudioContentRankingItem(
@@ -421,7 +429,11 @@ class RankingRepository(
.fetch()
}
fun fetchCreatorContentBySalesCountTop2(creatorId: Long, isAdult: Boolean): List<GetAudioContentRankingItem> {
fun fetchCreatorContentBySalesCountTop2(
creatorId: Long,
isAdult: Boolean,
theme: String
): List<GetAudioContentRankingItem> {
var where = member.isActive.isTrue
.and(member.role.eq(MemberRole.CREATOR))
.and(audioContent.isActive.isTrue)
@@ -435,6 +447,10 @@ class RankingRepository(
where = where.and(series.isAdult.isFalse)
}
if (theme.isNotBlank()) {
where = where.and(audioContentTheme.theme.eq(theme))
}
return queryFactory
.select(
QGetAudioContentRankingItem(

View File

@@ -189,12 +189,20 @@ class RankingService(
return repository.fetchCreatorByContentRevenueRankTop20(memberId, startDate, endDate)
}
fun fetchCreatorContentBySalesTop2(creatorId: Long, isAdult: Boolean): List<GetAudioContentRankingItem> {
return repository.fetchCreatorContentBySalesTop2(creatorId, isAdult)
fun fetchCreatorContentBySalesTop2(
creatorId: Long,
isAdult: Boolean,
theme: String = ""
): List<GetAudioContentRankingItem> {
return repository.fetchCreatorContentBySalesTop2(creatorId, isAdult, theme)
}
fun fetchCreatorContentBySalesCountTop2(creatorId: Long, isAdult: Boolean): List<GetAudioContentRankingItem> {
return repository.fetchCreatorContentBySalesCountTop2(creatorId, isAdult)
fun fetchCreatorContentBySalesCountTop2(
creatorId: Long,
isAdult: Boolean,
theme: String = ""
): List<GetAudioContentRankingItem> {
return repository.fetchCreatorContentBySalesCountTop2(creatorId, isAdult, theme)
}
fun fetchCreatorBySeriesRevenueRankTop20(