From 9b693d89b75147fb144189de5e7d4dec9efee806 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B9=80=ED=98=9C=EB=A0=B9?= Date: Mon, 5 Aug 2024 23:54:59 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20findProfileList=20=ED=95=A8=EC=88=98=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../domain/shareGroup/repository/ProfileRepository.java | 2 ++ .../naoman/domain/shareGroup/service/ShareGroupService.java | 1 + .../domain/shareGroup/service/ShareGroupServiceImpl.java | 4 ++++ 3 files changed, 7 insertions(+) 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