diff --git a/src/main/kotlin/kr/co/vividnext/sodalive/content/theme/AudioContentThemeQueryRepository.kt b/src/main/kotlin/kr/co/vividnext/sodalive/content/theme/AudioContentThemeQueryRepository.kt index 1ad1d65..fe3d8e8 100644 --- a/src/main/kotlin/kr/co/vividnext/sodalive/content/theme/AudioContentThemeQueryRepository.kt +++ b/src/main/kotlin/kr/co/vividnext/sodalive/content/theme/AudioContentThemeQueryRepository.kt @@ -64,15 +64,24 @@ class AudioContentThemeQueryRepository( where = where.and(audioContent.isPointAvailable.isTrue) } - return queryFactory + val query = queryFactory .select(audioContentTheme.theme) .from(audioContent) .innerJoin(audioContent.member, member) .innerJoin(audioContent.theme, audioContentTheme) .where(where) .groupBy(audioContentTheme.id) - .orderBy(audioContentTheme.orders.asc()) - .fetch() + + if (isFree) { + query.orderBy( + audioContentTheme.theme.eq("자기소개").desc(), + audioContentTheme.orders.asc() + ) + } else { + query.orderBy(audioContentTheme.orders.asc()) + } + + return query.fetch() } fun findThemeByIdAndActive(id: Long): AudioContentTheme? {