From f59f45d9a4241753843a70887709f5fb67277df1 Mon Sep 17 00:00:00 2001 From: Klaus Date: Sat, 12 Jul 2025 03:18:37 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20=EB=A9=94=EC=9D=B8=20=ED=99=88=20-=20?= =?UTF-8?q?=EC=B6=94=EC=B2=9C=20=EC=B1=84=EB=84=90=20-=20=EC=BD=98?= =?UTF-8?q?=ED=85=90=EC=B8=A0=EA=B0=80=20=EB=B9=88=20=EB=A6=AC=EC=8A=A4?= =?UTF-8?q?=ED=8A=B8=EB=A1=9C=20=EB=B0=98=ED=99=98=EB=90=98=EB=8A=94=20?= =?UTF-8?q?=EB=B2=84=EA=B7=B8=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../recommend/RecommendChannelQueryRepository.kt | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/main/kotlin/kr/co/vividnext/sodalive/query/recommend/RecommendChannelQueryRepository.kt b/src/main/kotlin/kr/co/vividnext/sodalive/query/recommend/RecommendChannelQueryRepository.kt index 3915203..fadfdc2 100644 --- a/src/main/kotlin/kr/co/vividnext/sodalive/query/recommend/RecommendChannelQueryRepository.kt +++ b/src/main/kotlin/kr/co/vividnext/sodalive/query/recommend/RecommendChannelQueryRepository.kt @@ -72,10 +72,20 @@ class RecommendChannelQueryRepository( ) ) .from(audioContent) - .leftJoin(audioContentLike).on(audioContentLike.audioContent.id.eq(audioContent.id)) - .leftJoin(audioContentComment).on(audioContentComment.audioContent.id.eq(audioContent.id)) + .leftJoin(audioContentLike) + .on( + audioContentLike.audioContent.id.eq(audioContent.id) + .and(audioContentLike.isActive.isTrue) + ) + .leftJoin(audioContentComment) + .on( + audioContentComment.audioContent.id.eq(audioContent.id) + .and(audioContentComment.isActive.isTrue) + ) .where(audioContent.member.id.eq(creatorId)) .groupBy(audioContent.id) + .orderBy(audioContentLike.id.countDistinct().desc()) + .limit(3) .fetch() } }