diff --git a/src/main/kotlin/kr/co/vividnext/sodalive/rank/RankingRepository.kt b/src/main/kotlin/kr/co/vividnext/sodalive/rank/RankingRepository.kt index 22153f2..611f595 100644 --- a/src/main/kotlin/kr/co/vividnext/sodalive/rank/RankingRepository.kt +++ b/src/main/kotlin/kr/co/vividnext/sodalive/rank/RankingRepository.kt @@ -426,10 +426,16 @@ class RankingRepository( .and(member.role.eq(MemberRole.CREATOR)) .and(member.id.eq(audioContent.member.id)) + var where = audioContent.isActive.isTrue + .and(audioContent.price.gt(0)) + .and(audioContent.duration.isNotNull) + .and(audioContent.limited.isNull) + .and(blockMember.id.isNull) + if (contentType != ContentType.ALL) { - memberCondition = memberCondition.and( - member.auth.isNull.or( - member.auth.gender.eq( + where = where.and( + audioContent.member.auth.isNull.or( + audioContent.member.auth.gender.eq( if (contentType == ContentType.MALE) { 0 } else { @@ -440,12 +446,6 @@ class RankingRepository( ) } - val where = audioContent.isActive.isTrue - .and(audioContent.price.gt(0)) - .and(audioContent.duration.isNotNull) - .and(audioContent.limited.isNull) - .and(blockMember.id.isNull) - return queryFactory .select( QContentCreatorResponse(