크리에이터 콘텐츠 조회
- 재생시간이 있는 콘텐츠만 조회되도록 수정
This commit is contained in:
		| @@ -166,6 +166,7 @@ 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)) | ||||||
|             ) |             ) | ||||||
|  |  | ||||||
| @@ -237,6 +238,7 @@ 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)) | ||||||
|             ) |             ) | ||||||
|  |  | ||||||
| @@ -336,6 +338,7 @@ 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())) | ||||||
| @@ -375,6 +378,7 @@ 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())) | ||||||
| @@ -401,6 +405,7 @@ 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 | ||||||
| @@ -435,6 +440,7 @@ 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 | ||||||
| @@ -479,6 +485,7 @@ 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) | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user