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

This commit is contained in:
vladp
2026-03-13 14:06:54 +07:00
parent bffdf17717
commit 83f29e3382
@@ -72,16 +72,6 @@ public class ViolationService {
List<Violation> fileViolations = violationsByFileId.getOrDefault(file.getId(),
Collections.emptyList());
List<ViolationInfoDTO> violationDtos = fileViolations.stream()
.map(v -> ViolationInfoDTO.builder()
.violationId(v.getId())
.url(v.getUrl())
.pageUrl(v.getPageUrl())
.host(v.getHost())
.createdDate(v.getCreatedDate())
.build())
.collect(Collectors.toList());
LocalDateTime latestDate = fileViolations.stream()
.map(Violation::getCreatedDate)
.max(LocalDateTime::compareTo)
@@ -91,15 +81,12 @@ public class ViolationService {
.fileId(file.getId())
.supportId(file.getSupportId())
.fileName(file.getOriginalFileName())
.storedFileName(file.getStoredFileName())
.filePath(file.getFilePath())
.fileSize(file.getFileSize())
.mimeType(file.getMimeType())
.status(file.getStatus())
.createdAt(file.getCreatedAt())
.violationCount(fileViolations.size())
.latestViolationDate(latestDate)
.violations(violationDtos)
.build();
})
.collect(Collectors.toList());