Updated code for super admin dashboard api
This commit is contained in:
@@ -33,4 +33,12 @@ public interface ApplicationRepository extends JpaRepository<ApplicationEntity,
|
||||
@Query("SELECT COUNT(a) FROM ApplicationEntity a WHERE a.userId = :userId AND a.status = 'SUBMIT' ")
|
||||
Long countSubmittedApplicationsByUserId(@Param("userId") Long userId);
|
||||
|
||||
@Query("SELECT COUNT(a) FROM ApplicationEntity a WHERE a.status = 'SUBMIT'")
|
||||
Long countSubmittedApplications();
|
||||
|
||||
@Query("SELECT COUNT(a) FROM ApplicationEntity a WHERE a.status = 'DRAFT'")
|
||||
Long countDraftApplications();
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@ package net.gepafin.tendermanagement.repositories;
|
||||
import java.util.List;
|
||||
|
||||
import org.springframework.data.jpa.repository.JpaRepository;
|
||||
import org.springframework.data.jpa.repository.Query;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import net.gepafin.tendermanagement.entities.CompanyEntity;
|
||||
@@ -15,4 +16,8 @@ public interface CompanyRepository extends JpaRepository<CompanyEntity, Long> {
|
||||
Boolean existsByVatNumber(String vatNumber);
|
||||
CompanyEntity findByVatNumber(String vatNumber);
|
||||
|
||||
@Query("SELECT COUNT(c) FROM CompanyEntity c")
|
||||
long countTotalCompanies();
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user