@@ -114,5 +114,29 @@ public interface ImageSimilarityRepository
|
||||
List<SimilarImageProjection> findExactDuplicates(
|
||||
@Param("hash64Hi") Long hash64_hi,
|
||||
@Param("hash64Lo") Long hash64_lo);
|
||||
|
||||
@Query(value = """
|
||||
SELECT
|
||||
h.hash64_hi AS hash64Hi,
|
||||
h.hash64_lo AS hash64Lo,
|
||||
h.file_id AS fileId,
|
||||
f.user_id AS userId,
|
||||
f.original_file_name AS originalFileName,
|
||||
f.file_size AS fileSize,
|
||||
f.stored_file_name AS similarFileId,
|
||||
f.support_id AS supportId,
|
||||
f.created_at AS uploadDate,
|
||||
f.file_extension AS extension,
|
||||
f.protection_status AS protectionStatus
|
||||
FROM image_hashes h
|
||||
JOIN file_entities f ON f.id = h.file_id
|
||||
WHERE h.hash64_hi = :hash64Hi
|
||||
AND h.hash64_lo = :hash64Lo
|
||||
AND (f.status = 'TEMP')
|
||||
""",
|
||||
nativeQuery = true)
|
||||
List<SimilarImageProjection> findExactDuplicatesTemp(
|
||||
@Param("hash64Hi") Long hash64_hi,
|
||||
@Param("hash64Lo") Long hash64_lo);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user