Resolved conflicts
This commit is contained in:
@@ -20,6 +20,6 @@ public interface AssignedApplicationsRepository extends JpaRepository<AssignedAp
|
||||
@Param("applicationId") Long applicationId,
|
||||
@Param("id") Long id);
|
||||
|
||||
|
||||
|
||||
@Query("SELECT COUNT(aa) FROM AssignedApplicationsEntity aa WHERE aa.isDeleted = false AND aa.userId = :userId AND aa.status <> 'CLOSE'")
|
||||
Long countAssignedApplicationsByUserId(@Param("userId") Long userId);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
package net.gepafin.tendermanagement.repositories;
|
||||
|
||||
import net.gepafin.tendermanagement.entities.RoleActionContextEntity;
|
||||
import org.springframework.data.jpa.repository.JpaRepository;
|
||||
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
|
||||
import org.springframework.data.jpa.repository.Query;
|
||||
import org.springframework.data.repository.query.Param;
|
||||
import org.springframework.stereotype.Repository;
|
||||
import java.util.List;
|
||||
|
||||
@Repository
|
||||
public interface RoleActionContextRepository extends JpaRepository<RoleActionContextEntity,Long>, JpaSpecificationExecutor<RoleActionContextEntity> {
|
||||
|
||||
@Query("SELECT r FROM RoleActionContextEntity r WHERE r.roleId = :roleId AND r.isDeleted = false AND r.isViewed = true")
|
||||
List<RoleActionContextEntity> findActionContextLabel(@Param("roleId") Long roleId);
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -1,18 +1,22 @@
|
||||
package net.gepafin.tendermanagement.repositories;
|
||||
|
||||
import net.gepafin.tendermanagement.entities.UserActionEntity;
|
||||
import org.springframework.data.domain.Page;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import org.springframework.data.jpa.repository.JpaRepository;
|
||||
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
|
||||
import org.springframework.data.jpa.repository.Query;
|
||||
import org.springframework.data.repository.query.Param;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Repository
|
||||
public interface UserActionsRepository extends JpaRepository<UserActionEntity, Long> {
|
||||
public interface UserActionsRepository extends JpaRepository<UserActionEntity, Long> , JpaSpecificationExecutor<UserActionEntity> {
|
||||
UserActionEntity findUserActionById(Long id);
|
||||
|
||||
|
||||
@Query("SELECT COUNT(u) FROM UserActionEntity u " +
|
||||
"WHERE u.userId = :userId " +
|
||||
"AND u.actionContext = 'USER_LOGIN' " +
|
||||
"AND u.isDeleted = false")
|
||||
Long countUserLoginAttempts(@Param("userId") Long userId);
|
||||
|
||||
UserActionEntity findUserActionByIdAndIsDeletedFalse(Long id);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user