From 40195ce2f161e6f92f2e175734b9f87e000729d8 Mon Sep 17 00:00:00 2001 From: sohyundoh Date: Wed, 9 Oct 2024 19:18:15 +0900 Subject: [PATCH] =?UTF-8?q?#527=20[hotfix]=20=EB=AA=A8=EC=9E=84=EB=B3=84?= =?UTF-8?q?=20=EB=B2=A0=EC=8A=A4=ED=8A=B8=20=EA=B8=80=EB=AA=A8=EC=9E=84=20?= =?UTF-8?q?=EC=82=B0=EC=A0=95=20=EB=B0=A9=EC=8B=9D=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mile/curious/repository/CuriousRepositoryCustomImpl.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/module-domain/src/main/java/com/mile/curious/repository/CuriousRepositoryCustomImpl.java b/module-domain/src/main/java/com/mile/curious/repository/CuriousRepositoryCustomImpl.java index fbe05dee..5e832f33 100644 --- a/module-domain/src/main/java/com/mile/curious/repository/CuriousRepositoryCustomImpl.java +++ b/module-domain/src/main/java/com/mile/curious/repository/CuriousRepositoryCustomImpl.java @@ -35,10 +35,13 @@ public List findMostCuriousPostBeforeOneWeek(fina } @Override - public List findPostByLatestCurious(final Moim moim, final int requestSize, final List posts) { + public List findPostByLatestCurious(final Moim targetMoim, final int requestSize, final List posts) { return queryFactory.select(post) .from(curious) .join(curious.post, post) + .join(topic).on(post.topic.id.eq(topic.id)) + .join(moim).on(topic.moim.id.eq(moim.id)) + .where(moim.id.eq(targetMoim.getId())) .where(post.notIn(posts)) .orderBy(curious.createdAt.desc()) .limit(requestSize)