NCBACK-25 add protection for audio and use hash method from library
Test Workflow / test (push) Successful in 2s

This commit is contained in:
vladp
2026-01-23 13:22:02 +07:00
parent e37cc06cd0
commit 51654fd060
12 changed files with 99 additions and 40 deletions
@@ -10,5 +10,5 @@ import java.util.List;
public interface ImageHashRepository extends JpaRepository<ImageHashEntity, String> {
void deleteByFileId(String fileId);
List<ImageHashEntity> findByFileId(String fileId);
ImageHashEntity findByHash64HiAndHash64Lo(Integer hash64Hi, Integer hash64Lo);
ImageHashEntity findByHash64HiAndHash64Lo(Long hash64Hi, Long hash64Lo);
}
@@ -48,7 +48,7 @@ public interface ImageSimilarityRepository
""",
nativeQuery = true)
List<SimilarImageProjection> findExactDuplicates(
@Param("hash64Hi") Integer hash64_hi,
@Param("hash64Lo") Integer hash64_lo);
@Param("hash64Hi") Long hash64_hi,
@Param("hash64Lo") Long hash64_lo);
}
@@ -1,8 +1,8 @@
package ru.soune.nocopy.repository;
public interface SimilarImageProjection {
Integer getHash64Hi();
Integer getHash64Lo();
Long getHash64Hi();
Long getHash64Lo();
String getFileId();
Long getUserId();
String getOriginalFileName();