From 28db8e3cc3e11b73f603fc8ceee9fa411a078380 Mon Sep 17 00:00:00 2001 From: chenbowen Date: Thu, 4 Sep 2025 11:13:48 +0800 Subject: [PATCH] =?UTF-8?q?1.=20=E6=96=B0=E5=A2=9E=E6=9F=90=E4=BA=9B?= =?UTF-8?q?=E5=9C=BA=E6=99=AF=E4=B8=8B=E9=9C=80=E8=A6=81=E7=9B=B4=E6=8E=A5?= =?UTF-8?q?=E6=A0=B9=E6=8D=AE=20fileId=20=E8=8E=B7=E5=8F=96=E8=A7=A3?= =?UTF-8?q?=E5=AF=86=E6=96=87=E4=BB=B6=E6=B5=81=E7=9A=84=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../yudao/module/infra/service/file/FileServiceImpl.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/yudao-module-infra/yudao-module-infra-server/src/main/java/cn/iocoder/yudao/module/infra/service/file/FileServiceImpl.java b/yudao-module-infra/yudao-module-infra-server/src/main/java/cn/iocoder/yudao/module/infra/service/file/FileServiceImpl.java index b8291ed6..b7b9c47e 100644 --- a/yudao-module-infra/yudao-module-infra-server/src/main/java/cn/iocoder/yudao/module/infra/service/file/FileServiceImpl.java +++ b/yudao-module-infra/yudao-module-infra-server/src/main/java/cn/iocoder/yudao/module/infra/service/file/FileServiceImpl.java @@ -75,6 +75,10 @@ public class FileServiceImpl implements FileService { throw exception(FILE_CAPTCHA_ERROR); } } + return getDecryptedBytes(fileId); + } + + public byte[] getDecryptedBytes(Long fileId) throws Exception { FileDO fileDO = validateFileExists(fileId); // 获取加密内容 FileClient client = fileConfigService.getFileClient(fileDO.getConfigId()); @@ -90,6 +94,7 @@ public class FileServiceImpl implements FileService { throw exception(FILE_DECRYPT_FAIL); } } + /** * 上传文件的前缀,是否包含日期(yyyyMMdd) * 目的:按照日期,进行分目录