Przeglądaj źródła

测试上传data.fdage

lyhzzz 2 lat temu
rodzic
commit
8008f13eb1

+ 3 - 3
src/main/java/com/fdkankan/manage/service/impl/SceneProServiceImpl.java

@@ -459,7 +459,7 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
                 jobj.put("camera",newSnCode.toLowerCase());
             }
         }
-        jsonObject.put("creator",newSnCode);
+        jsonObject.put("creator",newSnCode.toLowerCase());
         return jsonObject;
     }
 
@@ -467,7 +467,7 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
         String localPathFdage = null;
         try {
             String fdagePaht =  dataSource.replace("/mnt/data","home") +"/data.fdage";
-            localPathFdage = String.format(OssPath.localFdagePath,fdagePaht)+"/data.fdage";
+            localPathFdage = String.format(OssPath.localFdagePath,fdagePaht);
             String fileContent = fYunFileServiceInterface.getFileContent(fdagePaht);
 
             JSONObject jsonObject = updateFdageJson(JSONObject.parseObject(fileContent), newSnCode);
@@ -490,7 +490,7 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
             log.error("updateFdage-error:",e);
         }finally {
             if(localPathFdage != null){
-                FileUtil.del(localPathFdage);
+                //FileUtil.del(localPathFdage);
             }
         }
     }

+ 5 - 0
src/main/java/com/fdkankan/manage/test/TestController.java

@@ -1,6 +1,7 @@
 package com.fdkankan.manage.test;
 
 import cn.hutool.core.io.FileUtil;
+import com.alibaba.fastjson.JSONArray;
 import com.alibaba.fastjson.JSONObject;
 import com.fdkankan.common.util.FileUtils;
 import com.fdkankan.fyun.face.FYunFileServiceInterface;
@@ -32,14 +33,18 @@ public class TestController {
 
     @Autowired
     ISceneProService sceneProService;
+    @Autowired
+    FYunFileServiceInterface fYunFileServiceInterface;
 
     @RequestMapping("/test")
     public ResultData test(@RequestParam(required = false) String oldSnCode,
                            @RequestParam(required = false)String newSnCode,
                            @RequestParam(required = false)String dataSource){
+
         return ResultData.ok();
     }
 
+
     /**
      * 导入excel
      * type 0 入库模板, 1出库模板 ,2 客户关联模板