오디오 콘텐츠 리스트

- 오픈예정 콘텐츠가 리스트에 보이도록 로직 수정
This commit is contained in:
Klaus 2024-01-10 22:32:28 +09:00
parent e007a95982
commit 319893d60f
1 changed files with 10 additions and 4 deletions

View File

@ -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)