Skip to content

Commit

Permalink
Merge pull request #90 from 0702Yoon/main
Browse files Browse the repository at this point in the history
feat : 유저 전체 조회 (어드민 미포함)
  • Loading branch information
0702Yoon authored Aug 14, 2024
2 parents f7e20b1 + cf7706d commit b9273e0
Showing 1 changed file with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,7 @@ public MemberInfoResponse changeMemberInfo(String username) {
public List<MemberInfoResponse> inquireAllMemberInfo() {
List<MemberInfoResponse> memberInfoResponseList = new ArrayList<>();
for(Member member: memberLoader.getAllMember()){
if(distinguishUser(member.getAffiliations())){
memberInfoResponseList.add(MemberInfoResponse
.builder()
.email(member.getEmail())
Expand All @@ -272,10 +273,20 @@ public List<MemberInfoResponse> inquireAllMemberInfo() {
.updateAt(member.getUpdateAt())
.affiliationListDto(getMemberAffiliationRoleList())
.build());
}
}
return memberInfoResponseList;
}

private boolean distinguishUser(List<AffiliationMember> affiliations) {
for(AffiliationMember affiliationMember : affiliations){
if(!"ROLE_USER".equals(affiliationMember.getRole())){
return false;
}
}
return true;
}


@Override
public AffiliationListDto getMemberAffiliationRoleList() {
Expand Down

0 comments on commit b9273e0

Please sign in to comment.