From a2c17649219c74fd7c751cb3179e21fb5d5b64f8 Mon Sep 17 00:00:00 2001 From: luoqiz Date: Tue, 10 Jun 2025 11:53:24 +0800 Subject: [PATCH] =?UTF-8?q?feat(system/file):=20=E6=94=AF=E6=8C=81?= =?UTF-8?q?=E5=8E=9F=E7=94=9F=E6=96=87=E4=BB=B6=E4=B8=8A=E4=BC=A0=20(#166)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../admin/system/service/FileService.java | 35 +++++++++++++++++++ .../system/service/impl/FileServiceImpl.java | 21 +++++++++++ 2 files changed, 56 insertions(+) diff --git a/continew-module-system/src/main/java/top/continew/admin/system/service/FileService.java b/continew-module-system/src/main/java/top/continew/admin/system/service/FileService.java index 50f87867..4e38d9d0 100644 --- a/continew-module-system/src/main/java/top/continew/admin/system/service/FileService.java +++ b/continew-module-system/src/main/java/top/continew/admin/system/service/FileService.java @@ -27,6 +27,7 @@ import top.continew.starter.core.constant.StringConstants; import top.continew.starter.data.mp.service.IService; import top.continew.starter.extension.crud.service.BaseService; +import java.io.File; import java.io.IOException; import java.time.LocalDate; import java.util.List; @@ -73,6 +74,40 @@ public interface FileService extends BaseService allExtensions = FileTypeEnum.getAllExtensions(); CheckUtils.throwIf(!allExtensions.contains(extName), "不支持的文件类型,仅支持 {} 格式的文件", String .join(StringConstants.COMMA, allExtensions)); @@ -131,6 +145,13 @@ public class FileServiceImpl extends BaseServiceImpl