diff --git a/src/main/kotlin/kr/co/vividnext/sodalive/content/AudioContentRepository.kt b/src/main/kotlin/kr/co/vividnext/sodalive/content/AudioContentRepository.kt index 7e8abaa..56e0526 100644 --- a/src/main/kotlin/kr/co/vividnext/sodalive/content/AudioContentRepository.kt +++ b/src/main/kotlin/kr/co/vividnext/sodalive/content/AudioContentRepository.kt @@ -374,6 +374,7 @@ class AudioContentQueryRepositoryImpl(private val queryFactory: JPAQueryFactory) if (contentType != ContentType.ALL) { where = where.and( audioContent.member.auth.gender.eq(if (contentType == ContentType.MALE) 1 else 0) + .or(audioContent.isAdult.isFalse) ) } } @@ -453,6 +454,7 @@ class AudioContentQueryRepositoryImpl(private val queryFactory: JPAQueryFactory) if (contentType != ContentType.ALL) { where = where.and( audioContent.member.auth.gender.eq(if (contentType == ContentType.MALE) 1 else 0) + .or(audioContent.isAdult.isFalse) ) } } @@ -495,6 +497,7 @@ class AudioContentQueryRepositoryImpl(private val queryFactory: JPAQueryFactory) if (contentType != ContentType.ALL) { where = where.and( audioContent.member.auth.gender.eq(if (contentType == ContentType.MALE) 1 else 0) + .or(audioContent.isAdult.isFalse) ) } } @@ -607,9 +610,8 @@ class AudioContentQueryRepositoryImpl(private val queryFactory: JPAQueryFactory) } else { if (contentType != ContentType.ALL) { where = where.and( - audioContent.member.auth.gender.eq( - if (contentType == ContentType.MALE) 1 else 0 - ) + audioContent.member.auth.gender.eq(if (contentType == ContentType.MALE) 1 else 0) + .or(audioContent.isAdult.isFalse) ) } }