parent
ede4c465c6
commit
48d5f1674f
|
@ -166,6 +166,7 @@ class AudioContentQueryRepositoryImpl(private val queryFactory: JPAQueryFactory)
|
|||
var where = audioContent.member.id.eq(creatorId)
|
||||
.and(
|
||||
audioContent.isActive.isTrue
|
||||
.and(audioContent.duration.isNotNull)
|
||||
.or(audioContent.releaseDate.isNotNull.and(audioContent.duration.isNotNull))
|
||||
)
|
||||
|
||||
|
@ -237,6 +238,7 @@ class AudioContentQueryRepositoryImpl(private val queryFactory: JPAQueryFactory)
|
|||
var where = audioContent.member.id.eq(creatorId)
|
||||
.and(
|
||||
audioContent.isActive.isTrue
|
||||
.and(audioContent.duration.isNotNull)
|
||||
.or(audioContent.releaseDate.isNotNull.and(audioContent.duration.isNotNull))
|
||||
)
|
||||
|
||||
|
@ -336,6 +338,7 @@ class AudioContentQueryRepositoryImpl(private val queryFactory: JPAQueryFactory)
|
|||
}
|
||||
|
||||
var where = audioContent.isActive.isTrue
|
||||
.and(audioContent.duration.isNotNull)
|
||||
.and(
|
||||
audioContent.releaseDate.isNull
|
||||
.or(audioContent.releaseDate.loe(LocalDateTime.now()))
|
||||
|
@ -375,6 +378,7 @@ class AudioContentQueryRepositoryImpl(private val queryFactory: JPAQueryFactory)
|
|||
|
||||
override fun totalCountByTheme(memberId: Long, theme: String, isAdult: Boolean): Int {
|
||||
var where = audioContent.isActive.isTrue
|
||||
.and(audioContent.duration.isNotNull)
|
||||
.and(
|
||||
audioContent.releaseDate.isNull
|
||||
.or(audioContent.releaseDate.loe(LocalDateTime.now()))
|
||||
|
@ -401,6 +405,7 @@ class AudioContentQueryRepositoryImpl(private val queryFactory: JPAQueryFactory)
|
|||
|
||||
override fun totalCountNewContentFor2Weeks(theme: String, memberId: Long, isAdult: Boolean): Int {
|
||||
var where = audioContent.isActive.isTrue
|
||||
.and(audioContent.duration.isNotNull)
|
||||
.and(audioContent.releaseDate.goe(LocalDateTime.now().minusWeeks(2)))
|
||||
.and(
|
||||
audioContent.releaseDate.isNull
|
||||
|
@ -435,6 +440,7 @@ class AudioContentQueryRepositoryImpl(private val queryFactory: JPAQueryFactory)
|
|||
limit: Long
|
||||
): List<GetAudioContentMainItem> {
|
||||
var where = audioContent.isActive.isTrue
|
||||
.and(audioContent.duration.isNotNull)
|
||||
.and(audioContent.releaseDate.goe(LocalDateTime.now().minusWeeks(2)))
|
||||
.and(
|
||||
audioContent.releaseDate.isNull
|
||||
|
@ -479,6 +485,7 @@ class AudioContentQueryRepositoryImpl(private val queryFactory: JPAQueryFactory)
|
|||
): List<GetNewContentUploadCreator> {
|
||||
var where = audioContent.releaseDate.after(LocalDateTime.now().minusWeeks(2))
|
||||
.and(audioContent.isActive.isTrue)
|
||||
.and(audioContent.duration.isNotNull)
|
||||
|
||||
if (!isAdult) {
|
||||
where = where.and(audioContent.isAdult.isFalse)
|
||||
|
|
Loading…
Reference in New Issue