|
@@ -1,5 +1,6 @@
|
|
|
package com.fdkankan.contro.controller;
|
|
|
|
|
|
+import cn.hutool.core.io.FileUtil;
|
|
|
import cn.hutool.core.util.ZipUtil;
|
|
|
import cn.hutool.http.HttpUtil;
|
|
|
import com.alibaba.fastjson.JSON;
|
|
@@ -7,6 +8,7 @@ import com.alibaba.fastjson.JSONObject;
|
|
|
import com.fdkankan.common.constant.ErrorCode;
|
|
|
import com.fdkankan.common.exception.BusinessException;
|
|
|
import com.fdkankan.common.util.FileUtils;
|
|
|
+import com.fdkankan.contro.bean.SendCallAlgorithmDetail;
|
|
|
import com.fdkankan.contro.entity.User;
|
|
|
import com.alibaba.fastjson.JSON;
|
|
|
import com.alibaba.fastjson.JSONArray;
|
|
@@ -214,11 +216,32 @@ public class SceneFileController{
|
|
|
return sceneFileBuildService.noticeBuild(uuid);
|
|
|
}
|
|
|
|
|
|
- @PostMapping("/noticeBuild_bd")
|
|
|
+ @PostMapping("/send_bd")
|
|
|
public ResultData noticeBuildBd(String uuid) throws Exception {
|
|
|
- HttpUtil.post("http://localhost:8085/api/scene/file/noticeBuild", uuid);
|
|
|
+ String prefix = "http://192.168.0.25/oss/bd_server/" + uuid + "/";
|
|
|
+ String path = "/oss/4dkankan/bd_server/" + uuid;
|
|
|
+// List<String> strings = FileUtil.listFileNames(path);
|
|
|
+ List<String> strings = new ArrayList<>();
|
|
|
+ strings.add("asdf.jpeg");
|
|
|
+ strings.parallelStream().forEach(fileName ->{
|
|
|
+ String url = prefix.concat(fileName);
|
|
|
+ SendCallAlgorithmDetail detail = new SendCallAlgorithmDetail();
|
|
|
+ detail.setFileName(fileName);
|
|
|
+ detail.setUuid(uuid);
|
|
|
+ SendCallAlgorithmParam param = new SendCallAlgorithmParam();
|
|
|
+ param.setFilepath(url);
|
|
|
+ param.setDetails(detail);
|
|
|
+ HttpUtil.post("http://localhost:8085/api/scene/file/uploadFile", JSON.toJSONString(param));
|
|
|
+ });
|
|
|
+
|
|
|
return ResultData.ok();
|
|
|
}
|
|
|
|
|
|
+ public static void main(String[] args) {
|
|
|
+ List<String> strings = FileUtil.listFileNames("D:\\test5\\aaa");
|
|
|
+ System.out.println(JSON.toJSONString(strings));
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
}
|