Compare commits

..

No commits in common. "a999dd2085c0b3bd3322ee8d496676bc13f3f3df" and "49f95ab10059a5ab76baa9bab980f900a2e71cf8" have entirely different histories.

2 changed files with 2 additions and 9 deletions

View File

@ -166,7 +166,6 @@ 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))
)
@ -238,7 +237,6 @@ 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))
)
@ -338,7 +336,6 @@ 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()))
@ -378,7 +375,6 @@ 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()))
@ -405,7 +401,6 @@ 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
@ -440,7 +435,6 @@ 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
@ -485,7 +479,6 @@ 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)

View File

@ -54,9 +54,9 @@ class NewRouletteService(
oldRepository.deleteById(roulette.creatorId)
}
}
rouletteList.sortedBy { it.id }
return rouletteList.sortedWith(compareByDescending<NewRoulette> { it.isActive }.thenBy { it.id })
.asSequence()
return rouletteList.asSequence()
.map {
GetNewRouletteResponse(
it.id,