Merge pull request '콘텐츠 정렬 기준' (#118) from test into main
Reviewed-on: #118
This commit is contained in:
		| @@ -145,7 +145,7 @@ class AudioContentQueryRepositoryImpl(private val queryFactory: JPAQueryFactory) | |||||||
|         limit: Long |         limit: Long | ||||||
|     ): List<AudioContent> { |     ): List<AudioContent> { | ||||||
|         val orderBy = when (sortType) { |         val orderBy = when (sortType) { | ||||||
|             SortType.NEWEST -> audioContent.createdAt.desc() |             SortType.NEWEST -> audioContent.releaseDate.desc() | ||||||
|             SortType.PRICE_HIGH -> audioContent.price.desc() |             SortType.PRICE_HIGH -> audioContent.price.desc() | ||||||
|             SortType.PRICE_LOW -> audioContent.price.asc() |             SortType.PRICE_LOW -> audioContent.price.asc() | ||||||
|         } |         } | ||||||
| @@ -290,13 +290,13 @@ class AudioContentQueryRepositoryImpl(private val queryFactory: JPAQueryFactory) | |||||||
|             .where(where) |             .where(where) | ||||||
|             .offset(offset) |             .offset(offset) | ||||||
|             .limit(limit) |             .limit(limit) | ||||||
|             .orderBy(audioContent.createdAt.desc()) |             .orderBy(audioContent.releaseDate.desc()) | ||||||
|             .fetch() |             .fetch() | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     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.createdAt.goe(LocalDateTime.now().minusWeeks(2))) |             .and(audioContent.releaseDate.goe(LocalDateTime.now().minusWeeks(2))) | ||||||
|             .and( |             .and( | ||||||
|                 audioContent.releaseDate.isNull |                 audioContent.releaseDate.isNull | ||||||
|                     .or(audioContent.releaseDate.loe(LocalDateTime.now())) |                     .or(audioContent.releaseDate.loe(LocalDateTime.now())) | ||||||
| @@ -330,7 +330,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.createdAt.goe(LocalDateTime.now().minusWeeks(2))) |             .and(audioContent.releaseDate.goe(LocalDateTime.now().minusWeeks(2))) | ||||||
|             .and( |             .and( | ||||||
|                 audioContent.releaseDate.isNull |                 audioContent.releaseDate.isNull | ||||||
|                     .or(audioContent.releaseDate.loe(LocalDateTime.now())) |                     .or(audioContent.releaseDate.loe(LocalDateTime.now())) | ||||||
| @@ -362,7 +362,7 @@ class AudioContentQueryRepositoryImpl(private val queryFactory: JPAQueryFactory) | |||||||
|             .where(where) |             .where(where) | ||||||
|             .offset(offset) |             .offset(offset) | ||||||
|             .limit(limit) |             .limit(limit) | ||||||
|             .orderBy(audioContent.createdAt.desc()) |             .orderBy(audioContent.releaseDate.desc()) | ||||||
|             .fetch() |             .fetch() | ||||||
|     } |     } | ||||||
|  |  | ||||||
| @@ -370,7 +370,7 @@ class AudioContentQueryRepositoryImpl(private val queryFactory: JPAQueryFactory) | |||||||
|         cloudfrontHost: String, |         cloudfrontHost: String, | ||||||
|         isAdult: Boolean |         isAdult: Boolean | ||||||
|     ): List<GetNewContentUploadCreator> { |     ): List<GetNewContentUploadCreator> { | ||||||
|         var where = audioContent.createdAt.after(LocalDateTime.now().minusWeeks(2)) |         var where = audioContent.releaseDate.after(LocalDateTime.now().minusWeeks(2)) | ||||||
|             .and(audioContent.isActive.isTrue) |             .and(audioContent.isActive.isTrue) | ||||||
|  |  | ||||||
|         if (!isAdult) { |         if (!isAdult) { | ||||||
|   | |||||||
| @@ -151,7 +151,7 @@ class AudioContentService( | |||||||
|                 .withZoneSameInstant(ZoneId.of("UTC")) |                 .withZoneSameInstant(ZoneId.of("UTC")) | ||||||
|                 .toLocalDateTime() |                 .toLocalDateTime() | ||||||
|         } else { |         } else { | ||||||
|             null |             LocalDateTime.now() | ||||||
|         } |         } | ||||||
|  |  | ||||||
|         // contentFile 체크 |         // contentFile 체크 | ||||||
|   | |||||||
| @@ -94,7 +94,7 @@ class CreatorAdminAudioContentQueryRepositoryImpl( | |||||||
|             .where(where) |             .where(where) | ||||||
|             .offset(offset) |             .offset(offset) | ||||||
|             .limit(limit) |             .limit(limit) | ||||||
|             .orderBy(audioContent.id.desc()) |             .orderBy(audioContent.releaseDate.desc()) | ||||||
|             .fetch() |             .fetch() | ||||||
|     } |     } | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user