Skip to content

Commit

Permalink
fix: 팀 탈퇴한 회원에게 알림 안가게 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
minsu20 committed Dec 4, 2023
1 parent 8999b9e commit 8dc654d
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
public interface TeamMemberCustomRepository {
List<Long> findMemberIdsByTeamId(Long teamId);
Optional<List<String>> findFcmTokensByTeamIdAndMemberId(Long teamId, Long memberId);
Optional<List<String>> findFcmTokensByTeamId(Long teamId);
List<TeamMemberInfo> findTeamMemberInfoByTeamId(Long teamId);
List<TeamMember> findTeamMemberByMemberId(Long memberId);
}
Original file line number Diff line number Diff line change
Expand Up @@ -37,18 +37,8 @@ public Optional<List<String>> findFcmTokensByTeamIdAndMemberId(Long teamId, Long
.from(teamMember)
.where(teamMember.team.teamId.eq(teamId)
.and(teamMember.member.isNewUploadPush.eq(true))
.and(teamMember.member.memberId.ne(memberId)))
.fetch();

return result.isEmpty() ? Optional.empty() : Optional.of(result);
}

@Override
public Optional<List<String>> findFcmTokensByTeamId(Long teamId) {
List<String> result = queryFactory.select(teamMember.member.fcmToken)
.from(teamMember)
.where(teamMember.team.teamId.eq(teamId)
.and(teamMember.member.isNewUploadPush.eq(true)))
.and(teamMember.member.memberId.ne(memberId))
.and(teamMember.isDeleted.eq(false)))
.fetch();

return result.isEmpty() ? Optional.empty() : Optional.of(result);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,6 @@ public Optional<List<String>> getFcmTokensExceptMe(Long teamId, Long memberId) {
return teamMemberRepository.findFcmTokensByTeamIdAndMemberId(teamId, memberId);
}

public Optional<List<String>> getFcmTokens(Long teamId) {
return teamMemberRepository.findFcmTokensByTeamId(teamId);
}

public List<TeamMemberInfo> getTeamMemberInfo(Long teamId){
return teamMemberRepository.findTeamMemberInfoByTeamId(teamId);
}
Expand Down

0 comments on commit 8dc654d

Please sign in to comment.