From 0217e80b8630f199c8a54c1fb6a8342cea9bb75f Mon Sep 17 00:00:00 2001
From: 13693261870 <252740454@qq.com>
Date: 星期二, 28 二月 2023 11:09:12 +0800
Subject: [PATCH] 1

---
 src/main/java/com/lf/server/controller/data/upload/UploadController.java |   21 +++++++++++----------
 1 files changed, 11 insertions(+), 10 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..a850243 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);
         }
     }
 
@@ -129,7 +130,7 @@
 
             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