새로운 콘텐츠 - 최근 2주 데이터만 불러오도록 수정
This commit is contained in:
parent
ba491420f5
commit
ffdcd61894
|
@ -263,7 +263,7 @@ class AudioContentQueryRepositoryImpl(private val queryFactory: JPAQueryFactory)
|
|||
|
||||
override fun totalCountNewContentFor2Weeks(theme: String, isAdult: Boolean): Int {
|
||||
var where = audioContent.isActive.isTrue
|
||||
.and(audioContent.createdAt.loe(LocalDateTime.now()))
|
||||
.and(audioContent.createdAt.goe(LocalDateTime.now().minusWeeks(2)))
|
||||
|
||||
if (!isAdult) {
|
||||
where = where.and(audioContent.isAdult.isFalse)
|
||||
|
@ -291,7 +291,7 @@ class AudioContentQueryRepositoryImpl(private val queryFactory: JPAQueryFactory)
|
|||
limit: Long
|
||||
): List<GetAudioContentMainItem> {
|
||||
var where = audioContent.isActive.isTrue
|
||||
.and(audioContent.createdAt.loe(LocalDateTime.now()))
|
||||
.and(audioContent.createdAt.goe(LocalDateTime.now().minusWeeks(2)))
|
||||
|
||||
if (!isAdult) {
|
||||
where = where.and(audioContent.isAdult.isFalse)
|
||||
|
|
Loading…
Reference in New Issue