콘텐츠 메인 홈, 모닝콜, asmr, 단편, 무료, 다시듣기, 시리즈

- 남성향, 여성향 선택한 유저의 경우 해당 성향의 콘텐츠 + 미인증 크리에이터의 콘텐츠를 보여주도록 수정
This commit is contained in:
Klaus 2025-03-18 17:10:19 +09:00
parent b3b3d46696
commit c7eae53b22
8 changed files with 285 additions and 108 deletions

View File

@ -404,7 +404,15 @@ class AudioContentQueryRepositoryImpl(
} 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
}
)
)
)
}
}
@ -471,12 +479,14 @@ class AudioContentQueryRepositoryImpl(
} 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
}
)
)
)
}
@ -534,12 +544,14 @@ class AudioContentQueryRepositoryImpl(
} 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
}
)
)
)
}
@ -579,7 +591,15 @@ class AudioContentQueryRepositoryImpl(
} 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
}
)
)
)
}
}
@ -619,7 +639,15 @@ class AudioContentQueryRepositoryImpl(
} 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
}
)
)
)
}
}
@ -666,7 +694,15 @@ class AudioContentQueryRepositoryImpl(
} 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
}
)
)
)
}
}
@ -784,7 +820,15 @@ class AudioContentQueryRepositoryImpl(
} 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
}
)
)
)
}
}
@ -838,7 +882,15 @@ class AudioContentQueryRepositoryImpl(
} 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
}
)
)
)
}
}

View File

@ -23,7 +23,15 @@ class AudioContentCurationQueryRepository(private val queryFactory: JPAQueryFact
} 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
}
)
)
)
}
}
@ -31,6 +39,7 @@ class AudioContentCurationQueryRepository(private val queryFactory: JPAQueryFact
return queryFactory
.select(audioContent.id)
.from(audioContent)
.innerJoin(audioContent.member, member)
.where(where)
.fetch()
.size
@ -62,7 +71,15 @@ class AudioContentCurationQueryRepository(private val queryFactory: JPAQueryFact
} 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
}
)
)
)
}
}

View File

@ -46,12 +46,14 @@ class AudioContentMainTabRepository(
} 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
}
)
)
)
}
@ -103,12 +105,14 @@ class AudioContentMainTabRepository(
} 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
}
)
)
)
}

View File

@ -25,7 +25,15 @@ class RecommendSeriesRepository(
} else {
if (contentType != ContentType.ALL) {
where = where.and(
series.member.auth.gender.eq(if (contentType == ContentType.MALE) 0 else 1)
series.member.isNull.or(
series.member.auth.gender.eq(
if (contentType == ContentType.MALE) {
0
} else {
1
}
)
)
)
}
}
@ -59,12 +67,14 @@ class RecommendSeriesRepository(
} else {
if (contentType != ContentType.ALL) {
where = where.and(
series.member.auth.gender.eq(
if (contentType == ContentType.MALE) {
0
} else {
1
}
series.member.isNull.or(
series.member.auth.gender.eq(
if (contentType == ContentType.MALE) {
0
} else {
1
}
)
)
)
}

View File

@ -31,12 +31,14 @@ class ContentMainTabTagCurationRepository(
} 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
}
)
)
)
}
@ -73,12 +75,14 @@ class ContentMainTabTagCurationRepository(
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
}
)
)
)
}

View File

@ -137,7 +137,15 @@ class ContentSeriesQueryRepositoryImpl(
} else {
if (contentType != ContentType.ALL) {
where = where.and(
series.member.auth.gender.eq(if (contentType == ContentType.MALE) 0 else 1)
series.member.isNull.or(
series.member.auth.gender.eq(
if (contentType == ContentType.MALE) {
0
} else {
1
}
)
)
)
}
}
@ -171,12 +179,14 @@ class ContentSeriesQueryRepositoryImpl(
} else {
if (contentType != ContentType.ALL) {
where = where.and(
series.member.auth.gender.eq(
if (contentType == ContentType.MALE) {
0
} else {
1
}
series.member.isNull.or(
series.member.auth.gender.eq(
if (contentType == ContentType.MALE) {
0
} else {
1
}
)
)
)
}
@ -207,12 +217,14 @@ class ContentSeriesQueryRepositoryImpl(
} else {
if (contentType != ContentType.ALL) {
where = where.and(
series.member.auth.gender.eq(
if (contentType == ContentType.MALE) {
0
} else {
1
}
series.member.isNull.or(
series.member.auth.gender.eq(
if (contentType == ContentType.MALE) {
0
} else {
1
}
)
)
)
}
@ -253,12 +265,14 @@ class ContentSeriesQueryRepositoryImpl(
} else {
if (contentType != ContentType.ALL) {
where = where.and(
series.member.auth.gender.eq(
if (contentType == ContentType.MALE) {
0
} else {
1
}
series.member.isNull.or(
series.member.auth.gender.eq(
if (contentType == ContentType.MALE) {
0
} else {
1
}
)
)
)
}
@ -300,7 +314,15 @@ class ContentSeriesQueryRepositoryImpl(
} else {
if (contentType != ContentType.ALL) {
where = where.and(
series.member.auth.gender.eq(if (contentType == ContentType.MALE) 0 else 1)
series.member.isNull.or(
series.member.auth.gender.eq(
if (contentType == ContentType.MALE) {
0
} else {
1
}
)
)
)
}
}

View File

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

View File

@ -71,12 +71,14 @@ class RankingRepository(
} 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
}
)
)
)
}
@ -206,12 +208,14 @@ class RankingRepository(
} else {
if (contentType != ContentType.ALL) {
where = where.and(
series.member.auth.gender.eq(
if (contentType == ContentType.MALE) {
0
} else {
1
}
series.member.isNull.or(
series.member.auth.gender.eq(
if (contentType == ContentType.MALE) {
0
} else {
1
}
)
)
)
}
@ -256,12 +260,14 @@ class RankingRepository(
} else {
if (contentType != ContentType.ALL) {
where = where.and(
series.member.auth.gender.eq(
if (contentType == ContentType.MALE) {
0
} else {
1
}
series.member.isNull.or(
series.member.auth.gender.eq(
if (contentType == ContentType.MALE) {
0
} else {
1
}
)
)
)
}
@ -313,7 +319,15 @@ class RankingRepository(
} else {
if (contentType != ContentType.ALL) {
where = where.and(
series.member.auth.gender.eq(if (contentType == ContentType.MALE) 0 else 1)
series.member.isNull.or(
series.member.auth.gender.eq(
if (contentType == ContentType.MALE) {
0
} else {
1
}
)
)
)
}
}
@ -360,7 +374,15 @@ class RankingRepository(
} else {
if (contentType != ContentType.ALL) {
where = where.and(
series.member.auth.gender.eq(if (contentType == ContentType.MALE) 0 else 1)
series.member.isNull.or(
series.member.auth.gender.eq(
if (contentType == ContentType.MALE) {
0
} else {
1
}
)
)
)
}
}
@ -406,12 +428,14 @@ class RankingRepository(
if (contentType != ContentType.ALL) {
memberCondition = memberCondition.and(
member.auth.gender.eq(
if (contentType == ContentType.MALE) {
0
} else {
1
}
member.auth.isNull.or(
member.auth.gender.eq(
if (contentType == ContentType.MALE) {
0
} else {
1
}
)
)
)
}
@ -463,7 +487,15 @@ class RankingRepository(
} 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
}
)
)
)
}
}
@ -523,7 +555,15 @@ class RankingRepository(
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
}
)
)
)
}
@ -568,7 +608,15 @@ class RankingRepository(
} else {
if (contentType != ContentType.ALL) {
where = where.and(
series.member.auth.gender.eq(if (contentType == ContentType.MALE) 0 else 1)
series.member.isNull.or(
series.member.auth.gender.eq(
if (contentType == ContentType.MALE) {
0
} else {
1
}
)
)
)
}
}
@ -609,12 +657,14 @@ class RankingRepository(
} 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
}
)
)
)
}
@ -663,7 +713,15 @@ class RankingRepository(
} 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
}
)
)
)
}
}