|
@@ -117,7 +117,7 @@ public class SceneCommonService {
|
|
|
File file = new File(localPath);
|
|
|
if(!file.exists()){
|
|
|
log.error("sceneCopy-error--localFileExist:localPath:{},oldNum:{},newNum:{}",localPath,oldNum,newNum);
|
|
|
- return;
|
|
|
+ throw new BusinessException(ResultCode.SYSTEM_ERROR);
|
|
|
}
|
|
|
String fileContent = cn.hutool.core.io.FileUtil.readUtf8String(file);
|
|
|
if(StringUtils.isNotBlank(fileContent)){
|
|
@@ -128,6 +128,7 @@ public class SceneCommonService {
|
|
|
|
|
|
}catch (Exception e){
|
|
|
log.error("writeFile-error:{}",e);
|
|
|
+ throw new BusinessException(ResultCode.SYSTEM_ERROR);
|
|
|
}
|
|
|
}
|
|
|
if("v3".equals(sceneVersion)){
|
|
@@ -146,7 +147,7 @@ public class SceneCommonService {
|
|
|
|
|
|
if(!fYunFileServiceInterface.fileExist(ossStatusJsonPath)){
|
|
|
log.error("sceneCopy-error--ossFileExist:targetPath:{},oldNum:{},newNum:{}",ossStatusJsonPath,oldNum,newNum);
|
|
|
- return;
|
|
|
+ throw new BusinessException(ResultCode.SYSTEM_ERROR);
|
|
|
}
|
|
|
String localPath = SceneResourcePath.nasBasePath + ossStatusJsonPath;
|
|
|
File file = new File(localPath);
|
|
@@ -161,6 +162,7 @@ public class SceneCommonService {
|
|
|
fYunFileServiceInterface.uploadFile(localPath,ossStatusJsonPath);
|
|
|
}catch (Exception e){
|
|
|
log.error("writeFile-error:{}",e);
|
|
|
+ throw new BusinessException(ResultCode.SYSTEM_ERROR);
|
|
|
}
|
|
|
}
|
|
|
|