feat(latest-content-by-creator): 최신 콘텐츠 1개 조회시 오픈 되어 있는 콘텐츠만 조회하도록 수정

This commit is contained in:
2025-11-20 20:59:09 +09:00
parent 60989391f6
commit 26eae4b06e

View File

@@ -1453,11 +1453,10 @@ class AudioContentQueryRepositoryImpl(
isAdult: Boolean
): AudioContent? {
var where = audioContent.member.id.eq(creatorId)
.and(
audioContent.isActive.isTrue
.and(audioContent.duration.isNotNull)
.or(audioContent.releaseDate.isNotNull.and(audioContent.duration.isNotNull))
)
.and(audioContent.isActive.isTrue)
.and(audioContent.duration.isNotNull)
.and(audioContent.releaseDate.isNotNull)
.and(audioContent.releaseDate.gt(LocalDateTime.now()))
if (!isAdult) {
where = where.and(audioContent.isAdult.isFalse)