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

- 19금 콘텐츠 안보기 설정시 일반 콘텐츠 판매량으로 채널 조회
This commit is contained in:
Klaus 2025-03-19 12:23:54 +09:00
parent dc1c29b69d
commit e488f3419e
3 changed files with 19 additions and 12 deletions

View File

@ -83,6 +83,7 @@ class AudioContentMainTabHomeService(
val contentRankCreatorList = rankingService.fetchCreatorBySellContentCountRankTop20(
memberId = member.id!!,
isAdult = isAdult,
contentType = contentType,
startDate = startDate.minusDays(1),
endDate = endDate

View File

@ -409,6 +409,7 @@ class RankingRepository(
fun fetchCreatorBySellContentCountRankTop20(
memberId: Long,
isAdult: Boolean,
contentType: ContentType,
startDate: LocalDateTime,
endDate: LocalDateTime
@ -422,7 +423,7 @@ class RankingRepository(
.and(order.createdAt.goe(startDate))
.and(order.createdAt.lt(endDate))
var memberCondition = member.isActive.isTrue
val memberCondition = member.isActive.isTrue
.and(member.role.eq(MemberRole.CREATOR))
.and(member.id.eq(audioContent.member.id))
@ -432,18 +433,22 @@ class RankingRepository(
.and(audioContent.limited.isNull)
.and(blockMember.id.isNull)
if (contentType != ContentType.ALL) {
where = where.and(
audioContent.member.auth.isNull.or(
audioContent.member.auth.gender.eq(
if (contentType == ContentType.MALE) {
0
} else {
1
}
if (!isAdult) {
where = where.and(audioContent.isAdult.isFalse)
} else {
if (contentType != ContentType.ALL) {
where = where.and(
audioContent.member.auth.isNull.or(
audioContent.member.auth.gender.eq(
if (contentType == ContentType.MALE) {
0
} else {
1
}
)
)
)
)
}
}
return queryFactory

View File

@ -189,11 +189,12 @@ class RankingService(
fun fetchCreatorBySellContentCountRankTop20(
memberId: Long,
isAdult: Boolean,
contentType: ContentType,
startDate: LocalDateTime,
endDate: LocalDateTime
): List<ContentCreatorResponse> {
return repository.fetchCreatorBySellContentCountRankTop20(memberId, contentType, startDate, endDate)
return repository.fetchCreatorBySellContentCountRankTop20(memberId, isAdult, contentType, startDate, endDate)
}
fun fetchCreatorContentBySalesCountTop4(