콘텐츠 메인 홈, 모닝콜, asmr, 단편, 무료, 다시듣기, 시리즈
- 19금 콘텐츠 (안)보기 설정 - 남성향, 여성향 콘텐츠만 보기 설정 적용
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package kr.co.vividnext.sodalive.content.theme
|
||||
|
||||
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 org.springframework.beans.factory.annotation.Value
|
||||
@@ -27,12 +28,22 @@ class AudioContentThemeQueryRepository(
|
||||
.fetch()
|
||||
}
|
||||
|
||||
fun getActiveThemeOfContent(isAdult: Boolean = false, isFree: Boolean = false): List<String> {
|
||||
fun getActiveThemeOfContent(
|
||||
isAdult: Boolean = false,
|
||||
isFree: Boolean = false,
|
||||
contentType: ContentType
|
||||
): List<String> {
|
||||
var where = audioContent.isActive.isTrue
|
||||
.and(audioContentTheme.isActive.isTrue)
|
||||
|
||||
if (!isAdult) {
|
||||
where = where.and(audioContent.isAdult.isFalse)
|
||||
} else {
|
||||
if (contentType != ContentType.ALL) {
|
||||
where = where.and(
|
||||
audioContent.member.auth.gender.eq(if (contentType == ContentType.MALE) 0 else 1)
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
where = if (isFree) {
|
||||
|
Reference in New Issue
Block a user