|
@@ -171,7 +171,7 @@ public class SceneFileBuildServiceImpl extends ServiceImpl<ISceneFileBuildMapper
|
|
|
@Autowired
|
|
|
private ISceneFileUploadService sceneFileUploadService;
|
|
|
|
|
|
- @Autowired
|
|
|
+ @Resource
|
|
|
private FYunFileServiceInterface fYunFileService;
|
|
|
|
|
|
@Autowired
|
|
@@ -2253,6 +2253,12 @@ public class SceneFileBuildServiceImpl extends ServiceImpl<ISceneFileBuildMapper
|
|
|
}
|
|
|
|
|
|
//查询是否有等待通知计算的上传批次记录,如果有则加入,没有则新增
|
|
|
+
|
|
|
+ boolean lock = redisLockUtil.lock("single:upload:uuid:" + uuid, uuid, 1);
|
|
|
+ if(!lock){
|
|
|
+ throw new BusinessException(ErrorCode.SYSTEM_BUSY);
|
|
|
+ }
|
|
|
+
|
|
|
OrigFileUploadBatch condition = new OrigFileUploadBatch();
|
|
|
condition.setUuid(uuid);
|
|
|
condition.setStatus(0);
|
|
@@ -2271,6 +2277,8 @@ public class SceneFileBuildServiceImpl extends ServiceImpl<ISceneFileBuildMapper
|
|
|
origFileUpload.setBatchId(origFileUploadBatch.getBatchId());
|
|
|
origFileUploadService.save(origFileUpload);
|
|
|
|
|
|
+ redisLockUtil.unlockLua("single:upload:uuid:" + uuid, uuid);
|
|
|
+
|
|
|
if(fileName.equals("config.json")){
|
|
|
HttpUtil.downloadFile(filePath, sendCallAlgorithmPath.concat(uuid).concat("/config.json"));
|
|
|
if(!FileUtil.exist(sendCallAlgorithmPath.concat(uuid).concat("/config.json"))){
|
|
@@ -2279,7 +2287,7 @@ public class SceneFileBuildServiceImpl extends ServiceImpl<ISceneFileBuildMapper
|
|
|
}
|
|
|
if(fileName.equals("data.fdage")){
|
|
|
HttpUtil.downloadFile(filePath, sendCallAlgorithmPath.concat(uuid).concat("/data.fdage"));
|
|
|
- if(!FileUtil.exist(sendCallAlgorithmPath.concat(uuid).concat("/config.json"))){
|
|
|
+ if(!FileUtil.exist(sendCallAlgorithmPath.concat(uuid).concat("/data.fdage"))){
|
|
|
throw new BusinessException(ErrorCode.FAILURE_CODE_4002.code(), ErrorCode.FAILURE_CODE_4002.formatMessage("data.fdage"));
|
|
|
}
|
|
|
}
|