From f0ecfaaeccbeb123b3d3f0a3e159a34ab4fd820c Mon Sep 17 00:00:00 2001
From: 13693261870 <252740454@qq.com>
Date: 星期一, 09 一月 2023 09:00:32 +0800
Subject: [PATCH] 1

---
 src/main/java/com/lf/server/controller/data/upload/UploadController.java |   88 ++++++++++++++++++++++----------------------
 1 files changed, 44 insertions(+), 44 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 9bf1e71..28380aa 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
@@ -30,7 +30,7 @@
  */
 @Api(tags = "鏁版嵁绠$悊\\鏁版嵁涓婁紶")
 @RestController
-@RequestMapping("/dataLoader")
+@RequestMapping("/dataUpload")
 public class UploadController extends QueryController {
     @Autowired
     protected DataLoaderService dataLoaderService;
@@ -77,6 +77,47 @@
     }
 
     @SysLog()
+    @ApiOperation(value = "鏌ヨ鏂囦欢")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "path", value = "璺緞", dataType = "String", paramType = "query")
+    })
+    @GetMapping(value = "/selectFiles")
+    public ResponseMsg<List<MetaFileEntity>> selectFiles(String path) {
+        try {
+            List<MetaFileEntity> list = baseUploadService.selectFiles(path, EXT_LIST);
+
+            return success(list);
+        } catch (Exception ex) {
+            return fail(ex.getMessage(), null);
+        }
+    }
+
+    @SysLog()
+    @ApiOperation(value = "鍒犻櫎鏂囦欢")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "list", value = "瀹炰綋绫婚泦鍚�", dataType = "MetaEntity", paramType = "body")
+    })
+    @ResponseBody
+    @PostMapping(value = "/deleteFiles")
+    public ResponseMsg<Object> deleteFiles(@RequestBody List<MetaFileEntity> list, HttpServletRequest req) {
+        try {
+            UserEntity ue = tokenService.getCurrentUser(req);
+            if (ue == null) {
+                return fail("鐢ㄦ埛鏈櫥褰�", null);
+            }
+            if (null == list || list.isEmpty()) {
+                return fail("娌℃湁鎵惧埌鏂囦欢", null);
+            }
+
+            int rows = baseUploadService.deleteFiles(list);
+
+            return success("鎴愬姛", rows);
+        } catch (Exception ex) {
+            return fail(ex.getMessage(), null);
+        }
+    }
+
+    @SysLog()
     @ApiOperation(value = "鏌ヨ鏄犲皠")
     @ApiImplicitParams({
             @ApiImplicitParam(name = "path", value = "璺緞", dataType = "String", paramType = "query")
@@ -97,26 +138,10 @@
     @ApiImplicitParams({
             @ApiImplicitParam(name = "path", value = "璺緞", dataType = "String", paramType = "query")
     })
-    @GetMapping(value = "/selectFiles")
-    public ResponseMsg<List<MetaEntity>> selectFiles(String path) {
-        try {
-            List<MetaEntity> list = baseUploadService.selectFiles(path, EXT_LIST);
-
-            return success(list);
-        } catch (Exception ex) {
-            return fail(ex.getMessage(), null);
-        }
-    }
-
-    @SysLog()
-    @ApiOperation(value = "鏌ヨ鏂囦欢")
-    @ApiImplicitParams({
-            @ApiImplicitParam(name = "path", value = "璺緞", dataType = "String", paramType = "query")
-    })
     @GetMapping(value = "/selectFiles2")
-    public ResponseMsg<List<MetaEntity>> selectFiles2(String path) {
+    public ResponseMsg<List<MetaFileEntity>> selectFiles2(String path) {
         try {
-            List<MetaEntity> list = baseUploadService.selectFiles(path, null);
+            List<MetaFileEntity> list = baseUploadService.selectFiles(path, null);
 
             return success(list);
         } catch (Exception ex) {
@@ -187,31 +212,6 @@
             dataLoaderService.insertFiles(me, entity.getFileEntities(), entity.getTabEntities());
 
             return success("鎴愬姛", entity.getTabEntities());
-        } catch (Exception ex) {
-            return fail(ex.getMessage(), null);
-        }
-    }
-
-    @SysLog()
-    @ApiOperation(value = "鍒犻櫎鏂囦欢")
-    @ApiImplicitParams({
-            @ApiImplicitParam(name = "list", value = "瀹炰綋绫婚泦鍚�", dataType = "MetaEntity", paramType = "body")
-    })
-    @ResponseBody
-    @PostMapping(value = "/deleteFiles")
-    public ResponseMsg<Object> deleteFiles(@RequestBody List<MetaEntity> list, HttpServletRequest req) {
-        try {
-            UserEntity ue = tokenService.getCurrentUser(req);
-            if (ue == null) {
-                return fail("鐢ㄦ埛鏈櫥褰�", null);
-            }
-            if (null == list || list.isEmpty()) {
-                return fail("娌℃湁鎵惧埌鏂囦欢", null);
-            }
-
-            int rows = baseUploadService.deleteFiles(list);
-
-            return success("鎴愬姛", rows);
         } catch (Exception ex) {
             return fail(ex.getMessage(), null);
         }

--
Gitblit v1.9.3