큐레이션 - 조건 추가 #3
| @@ -319,6 +319,9 @@ class AudioContentQueryRepositoryImpl(private val queryFactory: JPAQueryFactory) | ||||
|         isAdult: Boolean | ||||
|     ): List<GetAudioContentMainItem> { | ||||
|         var where = audioContent.isActive.isTrue | ||||
|             .and(audioContent.member.isNotNull) | ||||
|             .and(audioContent.duration.isNotNull) | ||||
|             .and(audioContent.member.isActive.isTrue) | ||||
|             .and(audioContent.curation.id.eq(curationId)) | ||||
|  | ||||
|         if (!isAdult) { | ||||
| @@ -333,7 +336,7 @@ class AudioContentQueryRepositoryImpl(private val queryFactory: JPAQueryFactory) | ||||
|                     audioContent.title, | ||||
|                     audioContent.isAdult, | ||||
|                     member.id, | ||||
|                     member.profileImage.nullif("profile/default-profile.png") | ||||
|                     member.profileImage | ||||
|                         .prepend("/") | ||||
|                         .prepend(cloudfrontHost), | ||||
|                     member.nickname | ||||
| @@ -341,6 +344,7 @@ class AudioContentQueryRepositoryImpl(private val queryFactory: JPAQueryFactory) | ||||
|             ) | ||||
|             .from(audioContent) | ||||
|             .innerJoin(audioContent.member, member) | ||||
|             .leftJoin(audioContent.curation, audioContentCuration) | ||||
|             .where(where) | ||||
|             .orderBy(audioContent.id.desc()) | ||||
|             .fetch() | ||||
|   | ||||
		Reference in New Issue
	
	Block a user