콘텐츠 메인 홈, 모닝콜, asmr, 단편, 무료, 다시듣기, 시리즈
- 남성향, 여성향 선택한 유저의 경우 해당 성향의 콘텐츠 + 미인증 크리에이터의 콘텐츠를 보여주도록 수정
This commit is contained in:
@@ -4,6 +4,7 @@ import com.querydsl.jpa.impl.JPAQueryFactory
|
||||
import kr.co.vividnext.sodalive.content.ContentType
|
||||
import kr.co.vividnext.sodalive.content.QAudioContent.audioContent
|
||||
import kr.co.vividnext.sodalive.content.theme.QAudioContentTheme.audioContentTheme
|
||||
import kr.co.vividnext.sodalive.member.QMember.member
|
||||
import org.springframework.beans.factory.annotation.Value
|
||||
import org.springframework.stereotype.Repository
|
||||
|
||||
@@ -41,7 +42,15 @@ class AudioContentThemeQueryRepository(
|
||||
} else {
|
||||
if (contentType != ContentType.ALL) {
|
||||
where = where.and(
|
||||
audioContent.member.auth.gender.eq(if (contentType == ContentType.MALE) 0 else 1)
|
||||
audioContent.member.isNull.or(
|
||||
audioContent.member.auth.gender.eq(
|
||||
if (contentType == ContentType.MALE) {
|
||||
0
|
||||
} else {
|
||||
1
|
||||
}
|
||||
)
|
||||
)
|
||||
)
|
||||
}
|
||||
}
|
||||
@@ -55,6 +64,7 @@ class AudioContentThemeQueryRepository(
|
||||
return queryFactory
|
||||
.select(audioContentTheme.theme)
|
||||
.from(audioContent)
|
||||
.innerJoin(audioContent.member, member)
|
||||
.innerJoin(audioContent.theme, audioContentTheme)
|
||||
.where(where)
|
||||
.groupBy(audioContentTheme.id)
|
||||
|
Reference in New Issue
Block a user