validate login attempt
This commit is contained in:
@@ -1,9 +1,19 @@
|
||||
package net.gepafin.tendermanagement.repositories;
|
||||
|
||||
import net.gepafin.tendermanagement.entities.LoginAttemptEntity;
|
||||
|
||||
import org.springframework.data.domain.Page;
|
||||
import org.springframework.data.domain.PageRequest;
|
||||
import org.springframework.data.jpa.repository.JpaRepository;
|
||||
import org.springframework.data.jpa.repository.Query;
|
||||
import org.springframework.data.repository.query.Param;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
@Repository
|
||||
public interface LoginAttemptRepository extends JpaRepository<LoginAttemptEntity,Long> {
|
||||
|
||||
@Query("SELECT la FROM LoginAttemptEntity la LEFT JOIN UserEntity u ON u.email = la.username WHERE u.hub.id = :hubId")
|
||||
Page<LoginAttemptEntity> findByHubId(@Param("hubId") Long hubId, PageRequest pageRequest);
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user