Skip to content

Commit

Permalink
Merge pull request #55 from lotteon2/develop
Browse files Browse the repository at this point in the history
release
  • Loading branch information
CokeLee777 authored Jan 18, 2024
2 parents c394a2f + b06e702 commit d550579
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,8 @@ public class CommentRepositoryImpl implements CommentRepository {
public Page<Comment> findAllByPostId(Long postId, Pageable pageable) {
JPAQuery<Long> indexQuery =
jpaQueryFactory
.selectDistinct(comment.id)
.select(comment.id)
.from(comment)
.leftJoin(comment.post, post)
.where(post.id.eq(postId).and(comment.parent.isNull()))
.orderBy(getOrderCondition(pageable.getSort()).toArray(OrderSpecifier[]::new))
.offset(pageable.getOffset())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,8 @@ public void toggleFollow(Long followerId, List<Long> followingIds) {
public Page<Follow> findFollowingsByMemberId(Long memberId, Pageable pageable) {
JPAQuery<Long> indexQuery =
jpaQueryFactory
.selectDistinct(follow.follower.id)
.select(follow.follower.id)
.from(follow)
.leftJoin(follow.following)
.where(follow.follower.id.eq(memberId))
.orderBy(getOrderCondition(pageable.getSort()).toArray(OrderSpecifier[]::new))
.offset(pageable.getOffset())
Expand Down Expand Up @@ -145,8 +144,6 @@ public Page<FollowerResponse> findFollowersByMemberId(Long memberId, Pageable pa

long total = countQuery.fetchCount();
return new PageImpl<>(result, pageable, total);

// return followJpaRepository.findFollowersByMemberId(memberId, pageable);
}

private List<OrderSpecifier> getOrderCondition(Sort sort) {
Expand Down

0 comments on commit d550579

Please sign in to comment.