큐레이션 - 조건 추가
This commit is contained in:
parent
409af8b18c
commit
1884e5a5d9
|
@ -319,6 +319,9 @@ class AudioContentQueryRepositoryImpl(private val queryFactory: JPAQueryFactory)
|
||||||
isAdult: Boolean
|
isAdult: Boolean
|
||||||
): List<GetAudioContentMainItem> {
|
): List<GetAudioContentMainItem> {
|
||||||
var where = audioContent.isActive.isTrue
|
var where = audioContent.isActive.isTrue
|
||||||
|
.and(audioContent.member.isNotNull)
|
||||||
|
.and(audioContent.duration.isNotNull)
|
||||||
|
.and(audioContent.member.isActive.isTrue)
|
||||||
.and(audioContent.curation.id.eq(curationId))
|
.and(audioContent.curation.id.eq(curationId))
|
||||||
|
|
||||||
if (!isAdult) {
|
if (!isAdult) {
|
||||||
|
@ -333,7 +336,7 @@ class AudioContentQueryRepositoryImpl(private val queryFactory: JPAQueryFactory)
|
||||||
audioContent.title,
|
audioContent.title,
|
||||||
audioContent.isAdult,
|
audioContent.isAdult,
|
||||||
member.id,
|
member.id,
|
||||||
member.profileImage.nullif("profile/default-profile.png")
|
member.profileImage
|
||||||
.prepend("/")
|
.prepend("/")
|
||||||
.prepend(cloudfrontHost),
|
.prepend(cloudfrontHost),
|
||||||
member.nickname
|
member.nickname
|
||||||
|
@ -341,6 +344,7 @@ class AudioContentQueryRepositoryImpl(private val queryFactory: JPAQueryFactory)
|
||||||
)
|
)
|
||||||
.from(audioContent)
|
.from(audioContent)
|
||||||
.innerJoin(audioContent.member, member)
|
.innerJoin(audioContent.member, member)
|
||||||
|
.leftJoin(audioContent.curation, audioContentCuration)
|
||||||
.where(where)
|
.where(where)
|
||||||
.orderBy(audioContent.id.desc())
|
.orderBy(audioContent.id.desc())
|
||||||
.fetch()
|
.fetch()
|
||||||
|
|
Loading…
Reference in New Issue