dev delete
Test Workflow / test (push) Successful in 2s

This commit is contained in:
vladp
2026-03-11 16:20:56 +07:00
parent a39363a417
commit 087b9f7b33
4 changed files with 0 additions and 114 deletions
@@ -1,30 +0,0 @@
package ru.soune.nocopy.repository;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;
import ru.soune.nocopy.entity.monitoring.FoundViolationEntity;
import java.time.LocalDateTime;
import java.util.List;
@Repository
public interface FoundViolationRepository extends JpaRepository<FoundViolationEntity, String> {
List<FoundViolationEntity> findByFileIdOrderByFoundAtDesc(String fileId);
List<FoundViolationEntity> findByUserIdOrderByFoundAtDesc(Long userId);
@Query("SELECT fv FROM FoundViolationEntity fv WHERE fv.userId = :userId AND fv.isNew = true")
List<FoundViolationEntity> findNewViolationsByUser(@Param("userId") Long userId);
@Query("SELECT fv FROM FoundViolationEntity fv WHERE fv.file.id = :fileId AND fv.foundUrl = :foundUrl")
List<FoundViolationEntity> findDuplicate(@Param("fileId") String fileId, @Param("foundUrl") String foundUrl);
List<FoundViolationEntity> findByFoundAtBetween(LocalDateTime start, LocalDateTime end);
@Query("SELECT COUNT(fv) FROM FoundViolationEntity fv WHERE fv.userId = :userId AND fv.isNew = true")
long countNewByUserId(@Param("userId") Long userId);
}