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

- 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( val contentRankCreatorList = rankingService.fetchCreatorBySellContentCountRankTop20(
memberId = member.id!!, memberId = member.id!!,
isAdult = isAdult,
contentType = contentType, contentType = contentType,
startDate = startDate.minusDays(1), startDate = startDate.minusDays(1),
endDate = endDate endDate = endDate

View File

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

View File

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