Skip to content

Commit

Permalink
feat: findProfileList 함수 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
h-ye-ryoung committed Aug 5, 2024
1 parent ec8be8b commit 9b693d8
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -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;
Expand All @@ -13,4 +14,5 @@ public interface ProfileRepository extends JpaRepository<Profile, Long> {
Optional<Profile> findByShareGroupIdAndMemberId(Long shareGroupId, Long memberId);
List<Profile> findByMemberId(Long memberId);
boolean existsByShareGroupIdAndMemberId(Long shareGroupId, Long memberId);
List<Profile> findByMember(Member member);
}
Original file line number Diff line number Diff line change
Expand Up @@ -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<Profile> findProfileList(Member member);
}
Original file line number Diff line number Diff line change
Expand Up @@ -163,4 +163,8 @@ public boolean doesProfileExist(Long shareGroupId, Long memberId) {
return profileRepository.existsByShareGroupIdAndMemberId(shareGroupId, memberId);
}

@Override
public List<Profile> findProfileList(Member member) {
return profileRepository.findByMember(member);
}
}

0 comments on commit 9b693d8

Please sign in to comment.