rain
2024-06-24 1fc2b9a38ce7fb5f0a78361a731e98750fbd20c1
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,