Skip to content

Commit

Permalink
Move: MemberFollowCustomRepository로 변경 #113
Browse files Browse the repository at this point in the history
  • Loading branch information
5jisoo committed Nov 4, 2024
1 parent 7e05127 commit c5ad680
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import com.apps.pochak.global.api_payload.code.BaseCode;
import com.apps.pochak.global.api_payload.exception.GeneralException;
import com.apps.pochak.member.domain.Member;
import com.apps.pochak.member.domain.repository.MemberCustomRepository;
import com.apps.pochak.member.domain.repository.MemberFollowCustomRepository;
import com.apps.pochak.member.domain.repository.MemberRepository;
import com.apps.pochak.member.dto.response.MemberElement;
import com.apps.pochak.member.dto.response.MemberElements;
Expand All @@ -31,7 +31,7 @@
public class FollowService {
private final FollowRepository followRepository;
private final MemberRepository memberRepository;
private final MemberCustomRepository memberCustomRepository;
private final MemberFollowCustomRepository memberFollowCustomRepository;
private final FollowAlarmService followAlarmService;

public BaseCode follow(
Expand Down Expand Up @@ -104,7 +104,7 @@ public MemberElements getFollowings(
final Pageable pageable
) {
final Member member = memberRepository.findByHandleWithoutLogin(handle);
final Page<MemberElement> followingPage = memberCustomRepository.findFollowingsOfMemberAndIsFollow(
final Page<MemberElement> followingPage = memberFollowCustomRepository.findFollowingsOfMemberAndIsFollow(
member.getId(),
accessor.getMemberId(),
pageable
Expand All @@ -120,7 +120,7 @@ public MemberElements getFollowers(
final Pageable pageable
) {
final Member member = memberRepository.findByHandleWithoutLogin(handle);
final Page<MemberElement> followerPage = memberCustomRepository.findFollowersOfMemberAndIsFollow(
final Page<MemberElement> followerPage = memberFollowCustomRepository.findFollowersOfMemberAndIsFollow(
member.getId(),
accessor.getMemberId(),
pageable
Expand Down
6 changes: 3 additions & 3 deletions src/test/java/com/apps/pochak/global/TestQuerydslConfig.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.apps.pochak.global;

import com.apps.pochak.member.domain.repository.MemberCustomRepository;
import com.apps.pochak.member.domain.repository.MemberFollowCustomRepository;
import com.apps.pochak.post.domain.repository.PostCustomRepository;
import com.querydsl.jpa.impl.JPAQueryFactory;
import jakarta.persistence.EntityManager;
Expand All @@ -26,7 +26,7 @@ public PostCustomRepository postCustomRepository() {
}

@Bean
public MemberCustomRepository memberCustomRepository() {
return new MemberCustomRepository(jpaQueryFactory());
public MemberFollowCustomRepository memberCustomRepository() {
return new MemberFollowCustomRepository(jpaQueryFactory());
}
}

0 comments on commit c5ad680

Please sign in to comment.