diff --git a/src/main/java/com/umc/naoman/domain/shareGroup/repository/ProfileRepository.java b/src/main/java/com/umc/naoman/domain/shareGroup/repository/ProfileRepository.java index 01dee1b5..bf0e5037 100644 --- a/src/main/java/com/umc/naoman/domain/shareGroup/repository/ProfileRepository.java +++ b/src/main/java/com/umc/naoman/domain/shareGroup/repository/ProfileRepository.java @@ -1,5 +1,6 @@ package com.umc.naoman.domain.shareGroup.repository; +import com.umc.naoman.domain.member.entity.Member; import com.umc.naoman.domain.shareGroup.entity.Profile; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.stereotype.Repository; @@ -13,4 +14,5 @@ public interface ProfileRepository extends JpaRepository { Optional findByShareGroupIdAndMemberId(Long shareGroupId, Long memberId); List findByMemberId(Long memberId); boolean existsByShareGroupIdAndMemberId(Long shareGroupId, Long memberId); + List findByMember(Member member); } diff --git a/src/main/java/com/umc/naoman/domain/shareGroup/service/ShareGroupService.java b/src/main/java/com/umc/naoman/domain/shareGroup/service/ShareGroupService.java index f05fc26d..2c5b28cd 100644 --- a/src/main/java/com/umc/naoman/domain/shareGroup/service/ShareGroupService.java +++ b/src/main/java/com/umc/naoman/domain/shareGroup/service/ShareGroupService.java @@ -21,4 +21,5 @@ public interface ShareGroupService { ShareGroup deleteShareGroup(Long shareGroupId, Member member); ShareGroup getInviteInfo(Long shareGroupId, Member member); boolean doesProfileExist(Long shareGroupId, Long memberId); + List findProfileList(Member member); } diff --git a/src/main/java/com/umc/naoman/domain/shareGroup/service/ShareGroupServiceImpl.java b/src/main/java/com/umc/naoman/domain/shareGroup/service/ShareGroupServiceImpl.java index bfcf968b..a3f72156 100644 --- a/src/main/java/com/umc/naoman/domain/shareGroup/service/ShareGroupServiceImpl.java +++ b/src/main/java/com/umc/naoman/domain/shareGroup/service/ShareGroupServiceImpl.java @@ -163,4 +163,8 @@ public boolean doesProfileExist(Long shareGroupId, Long memberId) { return profileRepository.existsByShareGroupIdAndMemberId(shareGroupId, memberId); } + @Override + public List findProfileList(Member member) { + return profileRepository.findByMember(member); + } } \ No newline at end of file