From e26af85e049516e6ce2b082bc2bc90bf71643e95 Mon Sep 17 00:00:00 2001
From: 13693261870 <252740454@qq.com>
Date: 星期五, 24 三月 2023 09:06:30 +0800
Subject: [PATCH] 1

---
 src/main/java/com/lf/server/controller/data/upload/UploadController.java |   23 ++++++++++++-----------
 1 files changed, 12 insertions(+), 11 deletions(-)

diff --git a/src/main/java/com/lf/server/controller/data/upload/UploadController.java b/src/main/java/com/lf/server/controller/data/upload/UploadController.java
index 3850d3c..28ff4cf 100644
--- a/src/main/java/com/lf/server/controller/data/upload/UploadController.java
+++ b/src/main/java/com/lf/server/controller/data/upload/UploadController.java
@@ -46,7 +46,8 @@
 
             return success(pathName);
         } catch (Exception ex) {
-            return fail(ex.getMessage(), null);
+            log.error(ex.getMessage(), ex);
+            return fail(ex, null);
         }
     }
 
@@ -59,7 +60,7 @@
     @PostMapping(value = "/uploadFiles")
     public ResponseMsg<Object> uploadFiles(String path, HttpServletRequest req, HttpServletResponse res) {
         try {
-            List<MetaFileEntity> list = uploadService.uploadData(null, path, req, res);
+            List<MetaFileEntity> list = uploadService.uploadData(null, path, false, req, res);
             if (null == list || list.isEmpty()) {
                 return fail("娌℃湁鎵惧埌涓婁紶鏂囦欢", null);
             }
@@ -68,7 +69,7 @@
 
             return success(list);
         } catch (Exception ex) {
-            return fail(ex.getMessage(), null);
+            return fail(ex, null);
         }
     }
 
@@ -101,7 +102,7 @@
                 return fail("鎵句笉鍒拌涓婁紶闄勪欢鐨勫厓鏁版嵁");
             }
 
-            List<MetaFileEntity> list = uploadService.uploadData(null, path, req, res);
+            List<MetaFileEntity> list = uploadService.uploadData(null, path, false, req, res);
             if (null == list || list.isEmpty()) {
                 return fail("娌℃湁鎵惧埌涓婁紶鏂囦欢", null);
             }
@@ -113,7 +114,7 @@
 
             return success(rs);
         } catch (Exception ex) {
-            return fail(ex.getMessage(), null);
+            return fail(ex, null);
         }
     }
 
@@ -125,11 +126,11 @@
     @GetMapping(value = "/selectFiles")
     public ResponseMsg<List<MetaFileEntity>> selectFiles(String path) {
         try {
-            List<MetaFileEntity> list = uploadService.selectFiles(path, StaticData.ALL_EXTENSION);
+            List<MetaFileEntity> list = uploadService.selectFiles(path);
 
             return success(list);
         } catch (Exception ex) {
-            return fail(ex.getMessage(), null);
+            return fail(ex, null);
         }
     }
 
@@ -154,7 +155,7 @@
 
             return success("鎴愬姛", rows);
         } catch (Exception ex) {
-            return fail(ex.getMessage(), null);
+            return fail(ex, null);
         }
     }
 
@@ -189,7 +190,7 @@
 
             return success(list);
         } catch (Exception ex) {
-            return fail(ex.getMessage(), null);
+            return fail(ex, null);
         }
     }
 
@@ -214,7 +215,7 @@
 
             return success("鎴愬姛", list);
         } catch (Exception ex) {
-            return fail(ex.getMessage(), null);
+            return fail(ex, null);
         }
     }
 
@@ -234,7 +235,7 @@
 
             return success(count);
         } catch (Exception ex) {
-            return fail(ex.getMessage(), -1);
+            return fail(ex, -1);
         }
     }
 }

--
Gitblit v1.9.3