@@ -41,6 +41,9 @@ public interface ComplaintEntityRepository extends JpaRepository<ComplaintEntity
|
||||
""")
|
||||
Long getComplaintsWithoutLawCaseCount();
|
||||
|
||||
@Query("SELECT COUNT(*) FROM ComplaintEntity c WHERE c.violation.id IN :violations")
|
||||
int countComplaintByViolations(@Param("violations") List<Long> violations);
|
||||
|
||||
@Query("SELECT c FROM ComplaintEntity c WHERE c.email IN :emails")
|
||||
Page<ComplaintEntity> getComplaintsByUserEmails(@Param("emails") List<String> emails, Pageable pageable);
|
||||
}
|
||||
|
||||
@@ -44,5 +44,8 @@ public interface LawCaseRepository extends JpaRepository<LawCase, Long> {
|
||||
@Query("SELECT COUNT(lc.id) FROM LawCase lc")
|
||||
Long getTotalLawCasesCount();
|
||||
|
||||
@Query("SELECT COUNT(*) FROM LawCase l WHERE l.violationId IN :violationIds")
|
||||
int countLawCaseByViolationIds(@Param("violationIds") List<Long> violationIds);
|
||||
|
||||
Optional<LawCase> getLawCaseByViolationIdAndType(Long violationId, LawCaseType type);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user