From 66c690713b241edea28a436bbda1b72103c970c9 Mon Sep 17 00:00:00 2001 From: DinoDeveloper <79460319+asn6878@users.noreply.github.com> Date: Thu, 27 Jun 2024 16:08:59 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20=F0=9F=90=9B=20=EC=9B=94=EB=B3=84=20?= =?UTF-8?q?=EC=A7=80=EC=B6=9C=EB=82=B4=EC=97=AD=20=EC=A1=B0=ED=9A=8C=20?= =?UTF-8?q?=EC=BF=BC=EB=A6=AC=20=EB=B2=84=EA=B7=B8=20=EC=88=98=EC=A0=95=20?= =?UTF-8?q?(#117)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../spending/repository/SpendingCustomRepositoryImpl.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pennyway-domain/src/main/java/kr/co/pennyway/domain/domains/spending/repository/SpendingCustomRepositoryImpl.java b/pennyway-domain/src/main/java/kr/co/pennyway/domain/domains/spending/repository/SpendingCustomRepositoryImpl.java index 359ad2f02..1c56e65cf 100644 --- a/pennyway-domain/src/main/java/kr/co/pennyway/domain/domains/spending/repository/SpendingCustomRepositoryImpl.java +++ b/pennyway-domain/src/main/java/kr/co/pennyway/domain/domains/spending/repository/SpendingCustomRepositoryImpl.java @@ -51,10 +51,11 @@ public List findByYearAndMonth(Long userId, int year, int month) { List> orderSpecifiers = QueryDslUtil.getOrderSpecifier(sort); return queryFactory.selectFrom(spending) - .leftJoin(spending.user, user) .leftJoin(spending.spendingCustomCategory, spendingCustomCategory).fetchJoin() .where(spending.spendAt.year().eq(year) - .and(spending.spendAt.month().eq(month))) + .and(spending.spendAt.month().eq(month)) + .and(spending.user.id.eq(userId)) + ) .orderBy(orderSpecifiers.toArray(new OrderSpecifier[0])) .fetch(); }