Jelajahi Sumber

场景上传改造

dsx 1 tahun lalu
induk
melakukan
3c8dc219e0

+ 2 - 0
src/main/java/com/fdkankan/contro/bean/SendCallAlgorithmDetail.java

@@ -15,4 +15,6 @@ public class SendCallAlgorithmDetail {
 
     private Integer fileChunkNum;
 
+    private String fileName;
+
 }

+ 10 - 0
src/main/java/com/fdkankan/contro/controller/SceneFileController.java

@@ -198,5 +198,15 @@ public class SceneFileController{
         return ResultData.ok();
     }
 
+//    @PostMapping("upload_bd")
+//    public ResultData uploadBd(MultipartFile file){
+//
+//    }
+
+    @PostMapping("uploadFile")
+    public ResultData uploadFile(@RequestBody @Validated SendCallAlgorithmParam param) throws Exception {
+        return sceneFileBuildService.sendCallAlgorithm(param);
+    }
+
 
 }

+ 1 - 1
src/main/java/com/fdkankan/contro/generate/AutoGenerate.java

@@ -17,7 +17,7 @@ public class AutoGenerate {
         String path =System.getProperty("user.dir");
 
         generate(path,"contro", getTables(new String[]{
-                "jy_scene_auth"
+                "t_orig_file_upload_batch"
         }));
 
 //        generate(path,"goods", getTables(new String[]{

+ 2 - 0
src/main/java/com/fdkankan/contro/service/ISceneFileBuildService.java

@@ -34,4 +34,6 @@ public interface ISceneFileBuildService extends IService<SceneFileBuild> {
     ResultData uploadFile(MultipartFile file, String params) throws Exception;
 
     ResultData sendCallAlgorithm(SendCallAlgorithmParam param) throws Exception;
+
+    ResultData uploadFile(SendCallAlgorithmParam param) throws Exception;
 }

+ 42 - 0
src/main/java/com/fdkankan/contro/service/impl/SceneFileBuildServiceImpl.java

@@ -2206,4 +2206,46 @@ public class SceneFileBuildServiceImpl extends ServiceImpl<ISceneFileBuildMapper
         System.out.println(s);
     }
 
+    @Override
+    public ResultData uploadFile(SendCallAlgorithmParam param) throws Exception {
+
+        log.info("sendCallAlgorithm 参数为:{}", JSONObject.toJSONString(param));
+
+        String filePath = param.getFilepath();
+        if(StrUtil.isBlank(filePath)){
+            throw new BusinessException(ErrorCode.PARAM_REQUIRED.code(), "filePath不能为空");
+        }
+        SendCallAlgorithmDetail detail = param.getDetails();
+        String uploadType = detail.getUploadType();
+        if(StrUtil.isNotEmpty(uploadType) && "log".equals(uploadType)){
+            return ResultData.ok();
+        }
+        String uuid = detail.getUuid();
+        if(StrUtil.isBlank(uuid)){
+            throw new BusinessException(ErrorCode.PARAM_REQUIRED.code(), "uuid不能为空");
+        }
+        String fileName = detail.getFileName();
+        if(StrUtil.isBlank(fileName)){
+            throw new BusinessException(ErrorCode.PARAM_REQUIRED.code(), "fileName不能为空");
+        }
+
+        // TODO: 2023/11/22  查询是否有等待通知计算的上传记录,如果有则加入,没有则新增
+        Long uploadOperId = null;
+
+
+        // TODO: 2023/11/23 插入上传明细表
+
+
+
+
+
+
+
+
+
+
+
+
+        return ResultData.ok();
+    }
 }