terminado sign up

This commit is contained in:
2025-10-04 13:09:35 +02:00
parent d9c4f16cf0
commit b66ceee85c
15 changed files with 491 additions and 200 deletions

View File

@ -29,6 +29,15 @@ public interface UserDao extends JpaRepository<User, Long>, JpaSpecificationExec
boolean existsByUserNameIgnoreCase(String userName);
// Para comprobar si existe al hacer signup
@Query(value = """
SELECT id, deleted, enabled
FROM users
WHERE LOWER(username) = LOWER(:userName)
LIMIT 1
""", nativeQuery = true)
Optional<UserLite> findLiteByUserNameIgnoreCase(@Param("userName") String userName);
boolean existsByUserNameIgnoreCaseAndIdNot(String userName, Long id);
// Nuevo: para login/negocio "activo"