From 47860685215371e7244c58aff52bea02ecf53a1c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=AB=98=E9=9B=84?= Date: Sun, 23 Apr 2023 06:15:09 +0000 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=8A=9F=E8=83=BD:=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E6=9B=B4=E6=96=B0=E7=BC=93=E5=AD=98=E6=96=B9=E6=B3=95?= =?UTF-8?q?&forceUpdatedCache=3Dtrue=20=E6=96=B0=E5=A2=9E=E5=8A=9F?= =?UTF-8?q?=E8=83=BD:=E6=B7=BB=E5=8A=A0=E6=9B=B4=E6=96=B0=E7=BC=93?= =?UTF-8?q?=E5=AD=98=E6=96=B9=E6=B3=95&forceUpdatedCache=3Dtrue?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 高雄 --- .../src/main/java/cn/keking/service/FileHandlerService.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/server/src/main/java/cn/keking/service/FileHandlerService.java b/server/src/main/java/cn/keking/service/FileHandlerService.java index ec42e3c9..9e02b2c4 100644 --- a/server/src/main/java/cn/keking/service/FileHandlerService.java +++ b/server/src/main/java/cn/keking/service/FileHandlerService.java @@ -178,12 +178,12 @@ public class FileHandlerService { */ public List pdf2jpg(String pdfFilePath, String pdfName, String baseUrl, FileAttribute fileAttribute) { List imageUrls = new ArrayList<>(); - Integer imageCount = this.getConvertedPdfImage(pdfFilePath); + Integer imageCount = null; String imageFileSuffix = ".jpg"; String pdfFolder = pdfName.substring(0, pdfName.length() - 4); boolean forceUpdatedCache=fileAttribute.forceUpdatedCache(); - if (forceUpdatedCache){ - imageCount = null; + if (!forceUpdatedCache){ + imageCount = this.getConvertedPdfImage(pdfFilePath); } String urlPrefix; try {