Skip to content

Commit

Permalink
Fix : 비활성화 상태에서도 로그인 되도록 수정 (#195)
Browse files Browse the repository at this point in the history
  • Loading branch information
Astin01 authored Sep 22, 2024
1 parent 87c65d1 commit 7535e30
Showing 1 changed file with 2 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,10 @@

public interface UserRepository extends JpaRepository<User, Long>, UserRepositoryCustom {

@Query("SELECT u FROM User u JOIN FETCH u.userImage WHERE u.nickname = :nickname AND u.userStatus = '활성화'")
Optional<User> findByNickname(String nickname);

@Query("SELECT u FROM User u JOIN FETCH u.userImage WHERE u.email = :email AND u.userStatus = '활성화'")
Optional<User> findByEmail(String email);

@Query("SELECT u FROM User u JOIN FETCH u.userImage WHERE u.id = :userId AND u.userStatus = '활성화'")
@Query("SELECT u FROM User u JOIN FETCH u.userImage WHERE u.id = :userId AND u.userStatus = '활성화' OR u.userStatus = '비활성화'")
User findByUserId(Long userId);

@Query("SELECT u FROM User u JOIN FETCH u.userImage WHERE u.oauthId = :oauthId AND u.userStatus = '활성화'")
@Query("SELECT u FROM User u JOIN FETCH u.userImage WHERE u.oauthId = :oauthId AND u.userStatus = '활성화' OR u.userStatus = '비활성화'")
Optional<User> findByOauthId(String oauthId);

boolean existsByNickname(String nickname);
Expand Down

0 comments on commit 7535e30

Please sign in to comment.