resolved conflicts
This commit is contained in:
@@ -38,6 +38,7 @@ public interface ApplicationRepository extends JpaRepository<ApplicationEntity,
|
||||
@Query("SELECT COUNT(a) FROM ApplicationEntity a WHERE a.status = 'DRAFT'")
|
||||
Long countDraftApplications();
|
||||
|
||||
List<ApplicationEntity> findByCompanyIdAndUserIdAndIsDeletedFalse(Long companyId,Long userId);
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -19,5 +19,6 @@ public interface FaqRepository extends JpaRepository<FaqEntity, Long> {
|
||||
List<FaqEntity> findByCallIdAndIsDeletedFalse(Long callId);
|
||||
|
||||
Optional<FaqEntity> findByIdAndCallIdAndIsDeletedFalse(Long id, Long callId);
|
||||
List<FaqEntity> findByCompanyIdAndUserIdAndIsDeletedFalse(Long companyId,Long userId);
|
||||
|
||||
}
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
package net.gepafin.tendermanagement.repositories;
|
||||
|
||||
import net.gepafin.tendermanagement.entities.UserEntity;
|
||||
import net.gepafin.tendermanagement.model.response.UserResponseBean;
|
||||
import org.springframework.data.jpa.repository.JpaRepository;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
|
||||
@Repository
|
||||
@@ -21,5 +23,5 @@ public interface UserRepository extends JpaRepository<UserEntity, Long> {
|
||||
UserEntity findByBeneficiaryId(Long beneficiaryId);
|
||||
|
||||
Long countByStatusAndRoleEntity_RoleType(String status, String roleName);
|
||||
|
||||
List<UserEntity> findByRoleEntityId(Long roleId);
|
||||
}
|
||||
|
||||
@@ -12,11 +12,13 @@ import net.gepafin.tendermanagement.entities.UserWithCompanyEntity;
|
||||
|
||||
public interface UserWithCompanyRepository extends JpaRepository<UserWithCompanyEntity, Long> {
|
||||
|
||||
void deleteByCompanyId(Long companyId);
|
||||
void deleteByCompanyIdAndIsDeletedFalse(Long companyId);
|
||||
|
||||
@Query("SELECT uwc.companyId FROM UserWithCompanyEntity uwc WHERE uwc.userId = :userId")
|
||||
List<Long> findCompanyIdByUserId(@Param("userId") Long userId);
|
||||
@Query("SELECT u.companyId FROM UserWithCompanyEntity u WHERE u.userId = :userId AND u.isDeleted = false")
|
||||
List<Long> findActiveCompanyIdsByUserId(@Param("userId") Long userId);
|
||||
|
||||
Optional<UserWithCompanyEntity> findByUserIdAndCompanyId(Long userId, Long companyId);
|
||||
|
||||
|
||||
Optional<UserWithCompanyEntity> findByUserIdAndCompanyIdAndIsDeletedFalse(Long userId, Long companyId);
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user