|
@@ -376,18 +376,18 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
|
|
*/
|
|
*/
|
|
private void updateOssStatus(List<String> v3NumList ,List<String> v4NumList , Integer payStatus) {
|
|
private void updateOssStatus(List<String> v3NumList ,List<String> v4NumList , Integer payStatus) {
|
|
if(!v3NumList.isEmpty()){
|
|
if(!v3NumList.isEmpty()){
|
|
- v3NumList.forEach(e ->this.updateOssStatus(String.format(OssPath.v3_statusPath,e),payStatus));
|
|
|
|
|
|
+ v3NumList.forEach(e ->this.updateOssStatus(String.format(OssPath.v3_statusPath,e),payStatus,e));
|
|
}
|
|
}
|
|
if(!v4NumList.isEmpty()){
|
|
if(!v4NumList.isEmpty()){
|
|
- v4NumList.forEach(e ->this.updateOssStatus(String.format(OssPath.v4_statusPath,e),payStatus));
|
|
|
|
|
|
+ v4NumList.forEach(e ->this.updateOssStatus(String.format(OssPath.v4_statusPath,e),payStatus,e));
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
* 从oss中获取文件,并重写,上传替换
|
|
* 从oss中获取文件,并重写,上传替换
|
|
*/
|
|
*/
|
|
- @Override
|
|
|
|
- public void updateOssStatus(String path,Integer payStatus) {
|
|
|
|
|
|
+ public void updateOssStatus(String path,Integer payStatus,String num) {
|
|
|
|
+ String localStatusPath = String.format(OssPath.localStatusPath,num);
|
|
try {
|
|
try {
|
|
if(!fYunFileService.fileExist(path)){
|
|
if(!fYunFileService.fileExist(path)){
|
|
return;
|
|
return;
|
|
@@ -399,13 +399,15 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
|
|
JSONObject jsonObject = JSONObject.parseObject(data);
|
|
JSONObject jsonObject = JSONObject.parseObject(data);
|
|
jsonObject.put("payStatus",payStatus);
|
|
jsonObject.put("payStatus",payStatus);
|
|
String json = JSONUtil.toJsonStr(jsonObject);
|
|
String json = JSONUtil.toJsonStr(jsonObject);
|
|
- FileUtils.writeFile(OssPath.localStatusPath ,json);
|
|
|
|
- log.info("updateOssStatus--localPath:{},ossPath:{},payStatus:{}",OssPath.localStatusPath,path,payStatus);
|
|
|
|
- fYunFileService.uploadFile(OssPath.localStatusPath,path);
|
|
|
|
|
|
+ FileUtils.writeFile(localStatusPath ,json);
|
|
|
|
+ log.info("updateOssStatus--localPath:{},ossPath:{},payStatus:{}",localStatusPath,path,payStatus);
|
|
|
|
+ fYunFileService.uploadFile(localStatusPath,path);
|
|
}catch (Exception e){
|
|
}catch (Exception e){
|
|
- e.printStackTrace();
|
|
|
|
|
|
+ log.info("updateOssStatus--localPath:{},ossPath:{},payStatus:{}",localStatusPath,path,payStatus,e);
|
|
}finally {
|
|
}finally {
|
|
- FileUtil.del(OssPath.localStatusPath);
|
|
|
|
|
|
+ if(new File(localStatusPath).getParentFile().exists()){
|
|
|
|
+ FileUtil.del( new File(localStatusPath).getParentFile());
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|