Compare commits
No commits in common. "a999dd2085c0b3bd3322ee8d496676bc13f3f3df" and "49f95ab10059a5ab76baa9bab980f900a2e71cf8" have entirely different histories.
a999dd2085
...
49f95ab100
|
@ -166,7 +166,6 @@ class AudioContentQueryRepositoryImpl(private val queryFactory: JPAQueryFactory)
|
||||||
var where = audioContent.member.id.eq(creatorId)
|
var where = audioContent.member.id.eq(creatorId)
|
||||||
.and(
|
.and(
|
||||||
audioContent.isActive.isTrue
|
audioContent.isActive.isTrue
|
||||||
.and(audioContent.duration.isNotNull)
|
|
||||||
.or(audioContent.releaseDate.isNotNull.and(audioContent.duration.isNotNull))
|
.or(audioContent.releaseDate.isNotNull.and(audioContent.duration.isNotNull))
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -238,7 +237,6 @@ class AudioContentQueryRepositoryImpl(private val queryFactory: JPAQueryFactory)
|
||||||
var where = audioContent.member.id.eq(creatorId)
|
var where = audioContent.member.id.eq(creatorId)
|
||||||
.and(
|
.and(
|
||||||
audioContent.isActive.isTrue
|
audioContent.isActive.isTrue
|
||||||
.and(audioContent.duration.isNotNull)
|
|
||||||
.or(audioContent.releaseDate.isNotNull.and(audioContent.duration.isNotNull))
|
.or(audioContent.releaseDate.isNotNull.and(audioContent.duration.isNotNull))
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -338,7 +336,6 @@ class AudioContentQueryRepositoryImpl(private val queryFactory: JPAQueryFactory)
|
||||||
}
|
}
|
||||||
|
|
||||||
var where = audioContent.isActive.isTrue
|
var where = audioContent.isActive.isTrue
|
||||||
.and(audioContent.duration.isNotNull)
|
|
||||||
.and(
|
.and(
|
||||||
audioContent.releaseDate.isNull
|
audioContent.releaseDate.isNull
|
||||||
.or(audioContent.releaseDate.loe(LocalDateTime.now()))
|
.or(audioContent.releaseDate.loe(LocalDateTime.now()))
|
||||||
|
@ -378,7 +375,6 @@ class AudioContentQueryRepositoryImpl(private val queryFactory: JPAQueryFactory)
|
||||||
|
|
||||||
override fun totalCountByTheme(memberId: Long, theme: String, isAdult: Boolean): Int {
|
override fun totalCountByTheme(memberId: Long, theme: String, isAdult: Boolean): Int {
|
||||||
var where = audioContent.isActive.isTrue
|
var where = audioContent.isActive.isTrue
|
||||||
.and(audioContent.duration.isNotNull)
|
|
||||||
.and(
|
.and(
|
||||||
audioContent.releaseDate.isNull
|
audioContent.releaseDate.isNull
|
||||||
.or(audioContent.releaseDate.loe(LocalDateTime.now()))
|
.or(audioContent.releaseDate.loe(LocalDateTime.now()))
|
||||||
|
@ -405,7 +401,6 @@ class AudioContentQueryRepositoryImpl(private val queryFactory: JPAQueryFactory)
|
||||||
|
|
||||||
override fun totalCountNewContentFor2Weeks(theme: String, memberId: Long, isAdult: Boolean): Int {
|
override fun totalCountNewContentFor2Weeks(theme: String, memberId: Long, isAdult: Boolean): Int {
|
||||||
var where = audioContent.isActive.isTrue
|
var where = audioContent.isActive.isTrue
|
||||||
.and(audioContent.duration.isNotNull)
|
|
||||||
.and(audioContent.releaseDate.goe(LocalDateTime.now().minusWeeks(2)))
|
.and(audioContent.releaseDate.goe(LocalDateTime.now().minusWeeks(2)))
|
||||||
.and(
|
.and(
|
||||||
audioContent.releaseDate.isNull
|
audioContent.releaseDate.isNull
|
||||||
|
@ -440,7 +435,6 @@ class AudioContentQueryRepositoryImpl(private val queryFactory: JPAQueryFactory)
|
||||||
limit: Long
|
limit: Long
|
||||||
): List<GetAudioContentMainItem> {
|
): List<GetAudioContentMainItem> {
|
||||||
var where = audioContent.isActive.isTrue
|
var where = audioContent.isActive.isTrue
|
||||||
.and(audioContent.duration.isNotNull)
|
|
||||||
.and(audioContent.releaseDate.goe(LocalDateTime.now().minusWeeks(2)))
|
.and(audioContent.releaseDate.goe(LocalDateTime.now().minusWeeks(2)))
|
||||||
.and(
|
.and(
|
||||||
audioContent.releaseDate.isNull
|
audioContent.releaseDate.isNull
|
||||||
|
@ -485,7 +479,6 @@ class AudioContentQueryRepositoryImpl(private val queryFactory: JPAQueryFactory)
|
||||||
): List<GetNewContentUploadCreator> {
|
): List<GetNewContentUploadCreator> {
|
||||||
var where = audioContent.releaseDate.after(LocalDateTime.now().minusWeeks(2))
|
var where = audioContent.releaseDate.after(LocalDateTime.now().minusWeeks(2))
|
||||||
.and(audioContent.isActive.isTrue)
|
.and(audioContent.isActive.isTrue)
|
||||||
.and(audioContent.duration.isNotNull)
|
|
||||||
|
|
||||||
if (!isAdult) {
|
if (!isAdult) {
|
||||||
where = where.and(audioContent.isAdult.isFalse)
|
where = where.and(audioContent.isAdult.isFalse)
|
||||||
|
|
|
@ -54,9 +54,9 @@ class NewRouletteService(
|
||||||
oldRepository.deleteById(roulette.creatorId)
|
oldRepository.deleteById(roulette.creatorId)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
rouletteList.sortedBy { it.id }
|
||||||
|
|
||||||
return rouletteList.sortedWith(compareByDescending<NewRoulette> { it.isActive }.thenBy { it.id })
|
return rouletteList.asSequence()
|
||||||
.asSequence()
|
|
||||||
.map {
|
.map {
|
||||||
GetNewRouletteResponse(
|
GetNewRouletteResponse(
|
||||||
it.id,
|
it.id,
|
||||||
|
|
Loading…
Reference in New Issue