dev check violation for lawcase,complaint
Test Workflow / test (push) Has been cancelled

This commit is contained in:
2026-05-18 14:01:02 +07:00
parent 16620213c7
commit 218582958c
2 changed files with 1 additions and 3 deletions
@@ -99,7 +99,7 @@ public class ComplaintEntityHandler implements RequestHandler {
MessageCode.USER_NOT_HAD_PERMISSION.getDescription()); MessageCode.USER_NOT_HAD_PERMISSION.getDescription());
} }
if (violationRepository.existsViolation(violation)) { if (complaintEntityRepository.existsByViolationId(violationId)) {
return errorResponse(msgId, MessageCode.COMPLAINT_ALREADY_EXIST.getCode(), return errorResponse(msgId, MessageCode.COMPLAINT_ALREADY_EXIST.getCode(),
MessageCode.COMPLAINT_ALREADY_EXIST.getDescription()); MessageCode.COMPLAINT_ALREADY_EXIST.getDescription());
} }
@@ -95,6 +95,4 @@ public interface ViolationRepository extends JpaRepository<Violation, Long> {
@Query("SELECT COUNT(DISTINCT c.violation.id) FROM ComplaintEntity c WHERE c.violation IS NOT NULL") @Query("SELECT COUNT(DISTINCT c.violation.id) FROM ComplaintEntity c WHERE c.violation IS NOT NULL")
Long getViolationsWithComplaintCount(); Long getViolationsWithComplaintCount();
boolean existsViolation(Violation violation);
} }