From 1fc2b9a38ce7fb5f0a78361a731e98750fbd20c1 Mon Sep 17 00:00:00 2001
From: rain <167982779@qq.com>
Date: Mon, 24 Jun 2024 10:28:09 +0800
Subject: [PATCH] 定时四个九洲巡查任务,新增媒体文件任务查询、搜索接口

---
 src/main/java/com/dji/sample/patches/controller/PatchesController.java |   29 +++++++++++++++++++----------
 1 files changed, 19 insertions(+), 10 deletions(-)

diff --git a/src/main/java/com/dji/sample/patches/controller/PatchesController.java b/src/main/java/com/dji/sample/patches/controller/PatchesController.java
index 5860f0b..1a845ad 100644
--- a/src/main/java/com/dji/sample/patches/controller/PatchesController.java
+++ b/src/main/java/com/dji/sample/patches/controller/PatchesController.java
@@ -28,6 +28,8 @@
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
 
 import static com.dji.sample.component.AuthInterceptor.TOKEN_CLAIM;
 
@@ -151,6 +153,9 @@
 //            timerUtil.myTask2();
 //            timerUtil.myTask3();
             timerUtil.mytask4();
+            timerUtil.mytask5();
+            timerUtil.mytask6();
+            timerUtil.mytask7();
 
         } catch (Exception e) {
             throw new RuntimeException("db存储发送出现异常" + e);
@@ -158,16 +163,20 @@
         return ResponseResult.success();
     }
 
-    //    @GetMapping ("/tests")
-//    public ResponseResult use()  {
-//        try {
-//            TimerUtil.sendPostWithFileAndParameter("src/main/resources/tmp/20240613/205621_635148ea-0ddb-4b23-945c-8a67abd813c9.db",
-//                    "635148ea-0ddb-4b23-945c-8a67abd813c9");
-//        } catch (IOException e) {
-//            throw new RuntimeException(e);
-//        }
-//        return ResponseResult.success();
-//    }
+        @GetMapping ("/tests")
+    public ResponseResult use()  {
+            ExecutorService executor = Executors.newSingleThreadExecutor();
+            executor.execute(() -> {
+                try {
+                    timerUtil.sendPostWithFileAndParameter("DB/result_db.db",
+                            "635148ea-0ddb-4b23-945c-8a67abd813c9");
+                } catch (Exception e) {
+                    throw new RuntimeException(e);
+                }
+            });
+            executor.shutdown();
+            return ResponseResult.success();
+    }
     @PostMapping("/way")
     public void getway(@RequestParam("file") MultipartFile file,
                        @RequestParam String workspaceId,

--
Gitblit v1.9.3