From 319893d60f6c462b738a498249bdcbfecf86fc03 Mon Sep 17 00:00:00 2001 From: Klaus Date: Wed, 10 Jan 2024 22:32:28 +0900 Subject: [PATCH] =?UTF-8?q?=EC=98=A4=EB=94=94=EC=98=A4=20=EC=BD=98?= =?UTF-8?q?=ED=85=90=EC=B8=A0=20=EB=A6=AC=EC=8A=A4=ED=8A=B8=20-=20?= =?UTF-8?q?=EC=98=A4=ED=94=88=EC=98=88=EC=A0=95=20=EC=BD=98=ED=85=90?= =?UTF-8?q?=EC=B8=A0=EA=B0=80=20=EB=A6=AC=EC=8A=A4=ED=8A=B8=EC=97=90=20?= =?UTF-8?q?=EB=B3=B4=EC=9D=B4=EB=8F=84=EB=A1=9D=20=EB=A1=9C=EC=A7=81=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../sodalive/content/AudioContentRepository.kt | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) 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 34923ec..f466859 100644 --- a/src/main/kotlin/kr/co/vividnext/sodalive/content/AudioContentRepository.kt +++ b/src/main/kotlin/kr/co/vividnext/sodalive/content/AudioContentRepository.kt @@ -150,8 +150,11 @@ class AudioContentQueryRepositoryImpl(private val queryFactory: JPAQueryFactory) SortType.PRICE_LOW -> audioContent.price.asc() } - var where = audioContent.isActive.isTrue - .and(audioContent.member.id.eq(creatorId)) + var where = audioContent.member.id.eq(creatorId) + .and( + audioContent.isActive.isTrue + .or(audioContent.releaseDate.isNotNull) + ) if (!isAdult) { where = where.and(audioContent.isAdult.isFalse) @@ -170,8 +173,11 @@ class AudioContentQueryRepositoryImpl(private val queryFactory: JPAQueryFactory) creatorId: Long, isAdult: Boolean ): Int { - var where = audioContent.isActive.isTrue - .and(audioContent.member.id.eq(creatorId)) + var where = audioContent.member.id.eq(creatorId) + .and( + audioContent.isActive.isTrue + .or(audioContent.releaseDate.isNotNull) + ) if (!isAdult) { where = where.and(audioContent.isAdult.isFalse)