lyhzzz 2 лет назад
Родитель
Сommit
fd36f44f46

+ 1 - 1
src/main/java/com/fdkankan/ucenter/common/constants/ShellCmd.java

@@ -7,7 +7,7 @@ public class ShellCmd {
 	 * opType: file or folder
 	 * opType: file or folder
 	 * fyunType : oss ,aws
 	 * fyunType : oss ,aws
 	 */
 	 */
-	public static final String FYUN_UPLOAD = "sudo bash /opt/ossutil/fyun-upload.sh %s %s %s %s %s";
+	public static final String FYUN_UPLOAD = "sudo bash /opt/ossutil/fyun-upload.sh %s %s /%s %s %s";
 	public static final String FYUN_DOWN = "sudo bash /opt/ossutil/fyun-download.sh %s /%s %s %s %s";
 	public static final String FYUN_DOWN = "sudo bash /opt/ossutil/fyun-download.sh %s /%s %s %s %s";
 
 
 
 

+ 6 - 6
src/main/java/com/fdkankan/ucenter/service/impl/SceneProServiceImpl.java

@@ -602,12 +602,12 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
         }
         }
         jsonObject.put("uuidtime",time);
         jsonObject.put("uuidtime",time);
         FileUtils.writeFile(newDataSource + "/data.fdage", jsonObject.toJSONString());
         FileUtils.writeFile(newDataSource + "/data.fdage", jsonObject.toJSONString());
-        ShellUtil.yunUpload(newDataSource, NacosProperty.bucket.concat("/" + ConstantFilePath.OSS_PREFIX + newDataSource.replace(buildModelPath, "")));
+        ShellUtil.yunUpload(newDataSource,  ConstantFilePath.OSS_PREFIX + newDataSource.replace(buildModelPath, ""));
 
 
         // 复制计算结果
         // 复制计算结果
         ShellUtil.yunDownload(ConstantFilePath.OSS_PREFIX + oldDataSource.concat("_results/").replace(buildModelPath, ""), newDataSource.concat("_results"));
         ShellUtil.yunDownload(ConstantFilePath.OSS_PREFIX + oldDataSource.concat("_results/").replace(buildModelPath, ""), newDataSource.concat("_results"));
         if(new File(newDataSource.concat("_results")).exists()){
         if(new File(newDataSource.concat("_results")).exists()){
-            ShellUtil.yunUpload(newDataSource.concat("_results"),NacosProperty.bucket.concat("/" + ConstantFilePath.OSS_PREFIX + newDataSource.concat("_results").replace(buildModelPath, "")));
+            ShellUtil.yunUpload(newDataSource.concat("_results"), ConstantFilePath.OSS_PREFIX + newDataSource.concat("_results").replace(buildModelPath, ""));
             FileUtils.delAllFile(newDataSource.concat("_results"));
             FileUtils.delAllFile(newDataSource.concat("_results"));
         }
         }
         FileUtils.delAllFile(newDataSource);
         FileUtils.delAllFile(newDataSource);
@@ -655,10 +655,10 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
      * @param newNum
      * @param newNum
      */
      */
     private void uploadNewSceneToOss(String newNum) {
     private void uploadNewSceneToOss(String newNum) {
-        ShellUtil.yunUpload("/mnt/4Dkankan/scene/images/images" + newNum, NacosProperty.bucket.concat("/images/images") + newNum);
-        ShellUtil.yunUpload("/mnt/4Dkankan/scene/data/data" + newNum, NacosProperty.bucket.concat("/data/data") + newNum);
-        ShellUtil.yunUpload("/mnt/4Dkankan/scene/voice/voice" + newNum, NacosProperty.bucket.concat("/voice/voice") + newNum);
-        ShellUtil.yunUpload("/mnt/4Dkankan/scene/video/video" + newNum, NacosProperty.bucket.concat("/video/video") + newNum);
+        ShellUtil.yunUpload("/mnt/4Dkankan/scene/images/images" + newNum, "images/images" + newNum);
+        ShellUtil.yunUpload("/mnt/4Dkankan/scene/data/data" + newNum, "data/data" + newNum);
+        ShellUtil.yunUpload("/mnt/4Dkankan/scene/voice/voice" + newNum, "voice/voice" + newNum);
+        ShellUtil.yunUpload("/mnt/4Dkankan/scene/video/video" + newNum, "video/video" + newNum);
     }
     }
 
 
     @Override
     @Override