Selaa lähdekoodia

feat: 打开文件夹功能

Suuuuuukang 2 kuukautta sitten
vanhempi
sitoutus
070f226895

+ 9 - 0
taais-modules/taais-biz/src/main/java/com/taais/biz/controller/TargetIdentificationSubtaskDetailsController.java

@@ -1,6 +1,8 @@
 package com.taais.biz.controller;
 
+import java.awt.*;
 import java.io.File;
+import java.io.IOException;
 import java.util.ArrayList;
 import java.util.Date;
 import java.util.List;
@@ -197,6 +199,13 @@ public class TargetIdentificationSubtaskDetailsController extends BaseController
     @Value("${taais.profile}")
     private String profile;
 
+    @GetMapping("/openDir")
+    public CommonResult<Void> openDir(String directory) throws IOException {
+        log.error("check dir: {}, {}", directory, profile + "/task" + directory);
+        Desktop.getDesktop().open(new File(profile + "/task" + directory));
+        return CommonResult.success();
+    }
+
     @GetMapping("/getImgList")
     public CommonResult<List<String>> getImgList(String taskId, String subPath) {
         String path = profile + "/task/" + taskId;