Skip to content

Commit

Permalink
Merge branch 'refs/heads/bugfix/findByKakaoid' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
sungjun1116 committed May 5, 2024
2 parents c3eae79 + 15621d0 commit 243aa89
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public class MemberAppender {
@Transactional
public long append(final Member member, final Address address, final List<MultipartFile> multipartFile) throws IOException {
MemberEntity memberEntity = member.toEntity();
if (memberRepository.findByKakaoId(member.kakaoId()).isPresent()) {
if (memberRepository.findByKakaoIdAndStatusNot(member.kakaoId(), ActiveStatus.DELETED).isPresent()) {
throw new CoreApiException(CoreErrorType.DUPLICATE_MEMBER_ERROR);
}

Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/fofo/core/storage/MemberRepository.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

public interface MemberRepository extends JpaRepository<MemberEntity, Long>, MemberCustomRepository {

Optional<MemberEntity> findByKakaoId(String kakaoId);
Optional<MemberEntity> findByKakaoIdAndStatusNot(String kakaoId, ActiveStatus status);

Optional<MemberEntity> findByIdAndStatusNot(Long id, ActiveStatus status);

Expand Down

0 comments on commit 243aa89

Please sign in to comment.