From 574918bdc7fcf79796e6ccf63550c62349209441 Mon Sep 17 00:00:00 2001
From: 13693261870 <252740454@qq.com>
Date: 星期三, 23 十一月 2022 10:52:46 +0800
Subject: [PATCH] 1

---
 src/main/java/com/lf/server/service/all/BaseUploadService.java |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/src/main/java/com/lf/server/service/all/BaseUploadService.java b/src/main/java/com/lf/server/service/all/BaseUploadService.java
index 85903e5..6edd901 100644
--- a/src/main/java/com/lf/server/service/all/BaseUploadService.java
+++ b/src/main/java/com/lf/server/service/all/BaseUploadService.java
@@ -33,7 +33,7 @@
     /**
      * 鏌ヨ鏂囦欢
      */
-    public List<MetaFileEntity> selectFiles(String subPath) throws IOException {
+    public List<MetaFileEntity> selectFiles(String subPath, List<String> extList) throws IOException {
         String root = pathHelper.getConfig().getTempPath() + File.separator + subPath;
 
         File file = new File(root);
@@ -48,6 +48,13 @@
         List<MetaFileEntity> list = new ArrayList<MetaFileEntity>();
         for (File f : files) {
             String fileName = FileHelper.getFileName(f.getPath());
+            if (null != extList) {
+                String extName = FileHelper.getExtension(fileName);
+                if (!extList.contains(extName)) {
+                    continue;
+                }
+            }
+
             double sizes = FileHelper.sizeToMb(f.length());
             String filePath = subPath + File.separator + fileName;
 

--
Gitblit v1.9.3