diff --git a/src/main/java/solitour_backend/solitour/user/repository/UserRepository.java b/src/main/java/solitour_backend/solitour/user/repository/UserRepository.java index d745b37..059014d 100644 --- a/src/main/java/solitour_backend/solitour/user/repository/UserRepository.java +++ b/src/main/java/solitour_backend/solitour/user/repository/UserRepository.java @@ -7,10 +7,10 @@ public interface UserRepository extends JpaRepository, UserRepositoryCustom { - @Query("SELECT u FROM User u JOIN FETCH u.userImage WHERE u.id = :userId AND u.userStatus = '활성화' OR 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 = '활성화' OR u.userStatus = '비활성화'") + @Query("SELECT u FROM User u JOIN FETCH u.userImage WHERE u.oauthId = :oauthId AND (u.userStatus = '활성화' OR u.userStatus = '비활성화')") Optional findByOauthId(String oauthId); boolean existsByNickname(String nickname);