Compare commits

..

No commits in common. "1e62b4e3bc2444ea42ab6e47b73ecc0b879392de" and "e1b9b78094d563100d96765b123bd593c485d5f9" have entirely different histories.

View File

@ -8,6 +8,7 @@ import java.util.concurrent.atomic.AtomicReference;
import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.*;
import org.springframework.beans.BeanUtils;
import org.springframework.core.annotation.Order;
import org.springframework.stereotype.Component;
import org.springframework.web.multipart.MultipartFile;
@ -250,10 +251,11 @@ public class AutoJobAspect {
if (arg instanceof PDFFile pdfFile) {
// Create a copy of PDFFile to avoid mutating the original
// Using direct property access instead of reflection for better performance
PDFFile pdfFileCopy = new PDFFile();
pdfFileCopy.setFileId(pdfFile.getFileId());
pdfFileCopy.setFileInput(pdfFile.getFileInput());
// Use Spring's BeanUtils to copy all properties, avoiding missed fields if PDFFile
// grows
BeanUtils.copyProperties(pdfFile, pdfFileCopy);
// Case 1: fileId is provided but no fileInput
if (pdfFileCopy.getFileInput() == null && pdfFileCopy.getFileId() != null) {