From b7ef3c0cb1930c04f11b62640942b5ec80aa4632 Mon Sep 17 00:00:00 2001 From: Raod <1130305001@qq.com> Date: Wed, 25 Aug 2021 09:49:29 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AF=BC=E5=85=A5=E5=AF=BC=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/ReportDashboardServiceImpl.java | 5 ++-- .../file/controller/GaeaFileController.java | 2 +- .../modules/file/service/GaeaFileService.java | 24 +++++++++++++++++-- .../service/impl/GaeaFileServiceImpl.java | 23 ++++++++++++++++++ 4 files changed, 48 insertions(+), 6 deletions(-) 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 f20529e6..4f207d94 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 @@ -307,14 +307,14 @@ public class ReportDashboardServiceImpl implements ReportDashboardService, Initi //所有需要上传的图片 for (File imageFile : imageFiles) { //查看是否存在此image - String name = imageFile.getName(); String fileName = imageFile.getName().split("\\.")[0]; //根据fileId,从gaea_file中读出filePath LambdaQueryWrapper queryWrapper = Wrappers.lambdaQuery(); queryWrapper.eq(GaeaFile::getFileId, fileName); GaeaFile gaeaFile = gaeaFileService.selectOne(queryWrapper); if (null == gaeaFile) { - GaeaFile upload = gaeaFileService.upload(null, imageFile, fileName); + GaeaFile upload = gaeaFileService.upload(imageFile, fileName); + log.info("存入图片: {}", upload.getFilePath()); fileMap.put(fileName, upload.getUrlPath()); } } @@ -323,7 +323,6 @@ public class ReportDashboardServiceImpl implements ReportDashboardService, Initi } - //解析cotent ReportDashboardObjectDto detail = JSONObject.parseObject(content, ReportDashboardObjectDto.class); //将涉及到的图片路径替换(1.背景图,2.组件为图片的) diff --git a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/file/controller/GaeaFileController.java b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/file/controller/GaeaFileController.java index 9a900159..d0d45afc 100644 --- a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/file/controller/GaeaFileController.java +++ b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/file/controller/GaeaFileController.java @@ -33,7 +33,7 @@ public class GaeaFileController extends BaseController download(HttpServletRequest request, HttpServletResponse response, String fileId) { try {