From 0638e23c5fd4b40a57bbf3751603314a1d06cc3d Mon Sep 17 00:00:00 2001 From: Raod <1130305001@qq.com> Date: Fri, 21 Jan 2022 10:07:26 +0800 Subject: [PATCH] =?UTF-8?q?bugfix----=E5=AF=BC=E5=85=A5=E5=A4=A7=E5=B1=8F?= =?UTF-8?q?=E5=B7=B2=E5=AD=98=E5=9C=A8=E7=9A=84=E5=9B=BE=E7=89=87=E6=97=B6?= =?UTF-8?q?=E4=B8=8D=E4=BC=9A=E5=AE=9E=E6=97=B6=E6=9B=BF=E6=8D=A2=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dashboard/service/impl/ReportDashboardServiceImpl.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dashboard/service/impl/ReportDashboardServiceImpl.java b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dashboard/service/impl/ReportDashboardServiceImpl.java index a89fc060..a14a69ac 100644 --- a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dashboard/service/impl/ReportDashboardServiceImpl.java +++ b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dashboard/service/impl/ReportDashboardServiceImpl.java @@ -316,11 +316,15 @@ public class ReportDashboardServiceImpl implements ReportDashboardService, Initi LambdaQueryWrapper queryWrapper = Wrappers.lambdaQuery(); queryWrapper.eq(GaeaFile::getFileId, fileName); GaeaFile gaeaFile = gaeaFileService.selectOne(queryWrapper); + String uploadPath; if (null == gaeaFile) { GaeaFile upload = gaeaFileService.upload(imageFile, fileName); log.info("存入图片: {}", upload.getFilePath()); - fileMap.put(fileName, upload.getUrlPath()); + uploadPath = upload.getUrlPath(); + }else { + uploadPath = gaeaFile.getUrlPath(); } + fileMap.put(fileName, uploadPath); } }