updated code

This commit is contained in:
harish
2024-10-14 16:10:15 +05:30
parent 6f54ed0fad
commit 9a14bd48f5
7 changed files with 37 additions and 25 deletions

View File

@@ -29,8 +29,7 @@ public interface ApplicationRepository extends JpaRepository<ApplicationEntity,
public Optional<ApplicationEntity> findByIdAndUserIdAndCallIdAndIsDeletedFalse(Long applicationId, Long userId,
Long callId);
@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.userId = :userId AND a.company.id = :companyId AND a.status = 'SUBMIT' ")
Long countSubmittedApplicationsByUserId(@Param("userId") Long userId, @Param("companyId") Long companyId);
}