Skip to content

Commit

Permalink
fix : 유저 리스트 조회 count 쿼리 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
thalals committed Aug 2, 2024
1 parent 64773f7 commit 420c5b1
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,10 @@ public Page<UserListMapper> getUserListForPage(final String search, final Pageab
.limit(pageable.getPageSize())
.fetch();

long count = queryFactory.select(user.idx).from(user).stream().count();
long count = queryFactory.select(user.idx)
.from(user)
.where(searchText(search))
.stream().count();

return new PageImpl<>(results, pageable, count);
}
Expand Down

0 comments on commit 420c5b1

Please sign in to comment.