dev add method link
Test Workflow / test (push) Has been cancelled

This commit is contained in:
2026-05-06 13:49:16 +07:00
parent ef22693691
commit d0df78730f
@@ -4,6 +4,8 @@ import com.fasterxml.jackson.databind.ObjectMapper;
import com.vrt.NoCopyFileService;
import com.vrt.fileprotection.FileProtector;
import com.vrt.fileprotection.NoCopyCheckResult;
import com.vrt.fileprotection.documents.DocumentCheckResult;
import com.vrt.fileprotection.image.ImageCheckResult;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;
@@ -181,11 +183,25 @@ public class ImageFoundRequestHandler implements RequestHandler {
// boolean hashesAreEqual = hashSearchApiFile.get("hi").equals(checkFileHash.getHash64Hi())
// && hashSearchApiFile.get("low").equals(checkFileHash.getHash64Lo());
// if (!hashesAreEqual) {
// return new BaseResponse(request.getMsgId(), MessageCode.SUCCESS.getCode(),
// "Not found similar pictures", new YandexSearchResponse());
// }
switch (checkResult) {
case ImageCheckResult.Success success -> {
FileProtector.FileInfo info = success.getInfo();
log.info("info: " + info);
log.info("info: " + info);
log.info("info: " + info);
log.info("info: " + info);
log.info("info: " + info);
log.info("info: " + info);
log.info("info: " + info);
log.info("info: " + info);
FileEntity entity = fileEntityRepository.findByFileId(info.getId());
if (entity == null) {
return new BaseResponse(request.getMsgId(), MessageCode.SUCCESS.getCode(),
"Not found similar pictures", new YandexSearchResponse());
}
}
default -> throw new IllegalStateException("Unexpected value: " + checkResult);
}
} finally {
if (tempFile != null) {
try {