From 69cd778ea47a3c82d97a03f7e4a411fb680e4ba9 Mon Sep 17 00:00:00 2001 From: Raod <1130305001@qq.com> Date: Tue, 6 Sep 2022 14:36:53 +0800 Subject: [PATCH] gaea oss --- .../modules/file/service/impl/GaeaFileServiceImpl.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/file/service/impl/GaeaFileServiceImpl.java b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/file/service/impl/GaeaFileServiceImpl.java index 23be8a9d..4a1588a5 100644 --- a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/file/service/impl/GaeaFileServiceImpl.java +++ b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/file/service/impl/GaeaFileServiceImpl.java @@ -151,6 +151,9 @@ public class GaeaFileServiceImpl implements GaeaFileService { if (StringUtils.isBlank(fileObjectName) || StringUtils.isBlank(originalFilename)) { throw BusinessExceptionBuilder.build(ResponseCode.FILE_ONT_EXSIT); } + if (!originalFilename.endsWith(".".concat(gaeaFile.getFileType()))) { + originalFilename = originalFilename.concat(".").concat(gaeaFile.getFileType()); + } // 调用文件存储工厂,读取文件,返回字节数组 byte[] fileBytes = gaeaOSSTemplate.downloadFile(fileObjectName);