콘텐츠 랭킹 로직 - use_can 테이블 조인 제거
This commit is contained in:
		| @@ -2,7 +2,6 @@ package kr.co.vividnext.sodalive.content | ||||
|  | ||||
| import com.querydsl.core.types.dsl.Expressions | ||||
| import com.querydsl.jpa.impl.JPAQueryFactory | ||||
| import kr.co.vividnext.sodalive.can.use.QUseCan.useCan | ||||
| import kr.co.vividnext.sodalive.content.QAudioContent.audioContent | ||||
| import kr.co.vividnext.sodalive.content.QBundleAudioContent.bundleAudioContent | ||||
| import kr.co.vividnext.sodalive.content.main.GetAudioContentMainItem | ||||
| @@ -482,12 +481,13 @@ class AudioContentQueryRepositoryImpl(private val queryFactory: JPAQueryFactory) | ||||
|         offset: Long, | ||||
|         limit: Long | ||||
|     ): List<GetAudioContentRankingItem> { | ||||
|         var where = audioContent.isActive.isTrue | ||||
|         var where = order.createdAt.goe(startDate) | ||||
|             .and(order.createdAt.lt(endDate)) | ||||
|             .and(audioContent.isActive.isTrue) | ||||
|             .and(audioContent.member.isNotNull) | ||||
|             .and(audioContent.duration.isNotNull) | ||||
|             .and(audioContent.member.isActive.isTrue) | ||||
|             .and(useCan.createdAt.goe(startDate)) | ||||
|             .and(useCan.createdAt.lt(endDate)) | ||||
|             .and(audioContentTheme.isActive.isTrue) | ||||
|  | ||||
|         if (!isAdult) { | ||||
|             where = where.and(audioContent.isAdult.isFalse) | ||||
| @@ -506,8 +506,7 @@ class AudioContentQueryRepositoryImpl(private val queryFactory: JPAQueryFactory) | ||||
|                     member.nickname | ||||
|                 ) | ||||
|             ) | ||||
|             .from(useCan) | ||||
|             .innerJoin(useCan.order, order) | ||||
|             .from(order) | ||||
|             .innerJoin(order.audioContent, audioContent) | ||||
|             .innerJoin(audioContent.member, member) | ||||
|             .innerJoin(audioContent.theme, audioContentTheme) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user