dev fix add count
Test Workflow / test (push) Has been cancelled

This commit is contained in:
2026-04-28 13:53:51 +07:00
parent cb01e24d87
commit 66af0ea285
3 changed files with 8 additions and 4 deletions
@@ -41,7 +41,7 @@ public interface ComplaintEntityRepository extends JpaRepository<ComplaintEntity
""")
Long getComplaintsWithoutLawCaseCount();
@Query("SELECT COUNT(*) FROM ComplaintEntity c WHERE c.violation.id IN :violations")
@Query("SELECT COUNT(c) 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")
@@ -44,7 +44,7 @@ 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")
@Query("SELECT COUNT(l) FROM LawCase l WHERE l.violationId IN :violationIds")
int countLawCaseByViolationIds(@Param("violationIds") List<Long> violationIds);
Optional<LawCase> getLawCaseByViolationIdAndType(Long violationId, LawCaseType type);