콘텐츠 메인 - 채널별 ** 콘텐츠
- 매출 순위 제거
This commit is contained in:
@@ -381,54 +381,6 @@ class RankingRepository(
|
||||
.fetch()
|
||||
}
|
||||
|
||||
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)
|
||||
.and(audioContent.duration.isNotNull)
|
||||
.and(audioContent.limited.isNull)
|
||||
.and(audioContentTheme.isActive.isTrue)
|
||||
.and(order.isActive.isTrue)
|
||||
.and(member.id.eq(creatorId))
|
||||
|
||||
if (!isAdult) {
|
||||
where = where.and(series.isAdult.isFalse)
|
||||
}
|
||||
|
||||
if (theme.isNotBlank()) {
|
||||
where = where.and(audioContentTheme.theme.eq(theme))
|
||||
}
|
||||
|
||||
return queryFactory
|
||||
.select(
|
||||
QGetAudioContentRankingItem(
|
||||
audioContent.id,
|
||||
audioContent.title,
|
||||
audioContent.coverImage.prepend("/").prepend(imageHost),
|
||||
audioContentTheme.theme,
|
||||
audioContent.price,
|
||||
audioContent.duration,
|
||||
member.id,
|
||||
member.nickname,
|
||||
member.profileImage.prepend("/").prepend(imageHost)
|
||||
)
|
||||
)
|
||||
.from(order)
|
||||
.innerJoin(order.audioContent, audioContent)
|
||||
.innerJoin(audioContent.theme, audioContentTheme)
|
||||
.innerJoin(audioContent.member, member)
|
||||
.where(where)
|
||||
.groupBy(audioContent.id)
|
||||
.orderBy(order.can.sum().desc())
|
||||
.offset(0)
|
||||
.limit(2)
|
||||
.fetch()
|
||||
}
|
||||
|
||||
fun fetchCreatorContentBySalesCountTop4(
|
||||
creatorId: Long,
|
||||
isAdult: Boolean,
|
||||
|
@@ -189,14 +189,6 @@ class RankingService(
|
||||
return repository.fetchCreatorBySellContentCountRankTop20(memberId, startDate, endDate)
|
||||
}
|
||||
|
||||
fun fetchCreatorContentBySalesTop2(
|
||||
creatorId: Long,
|
||||
isAdult: Boolean,
|
||||
theme: String = ""
|
||||
): List<GetAudioContentRankingItem> {
|
||||
return repository.fetchCreatorContentBySalesTop2(creatorId, isAdult, theme)
|
||||
}
|
||||
|
||||
fun fetchCreatorContentBySalesCountTop4(
|
||||
creatorId: Long,
|
||||
isAdult: Boolean,
|
||||
|
Reference in New Issue
Block a user