Skip to content

Commit

Permalink
fix: 🐛 월별 지출내역 조회 쿼리 버그 수정 (#117)
Browse files Browse the repository at this point in the history
  • Loading branch information
asn6878 authored Jun 27, 2024
1 parent 8ed7c8c commit 66c6907
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,11 @@ public List<Spending> findByYearAndMonth(Long userId, int year, int month) {
List<OrderSpecifier<?>> 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();
}
Expand Down

0 comments on commit 66c6907

Please sign in to comment.