|
@@ -1889,16 +1889,16 @@ public class SceneFileBuildServiceImpl extends ServiceImpl<ISceneFileBuildMapper
|
|
}
|
|
}
|
|
result = ResultData.ok();
|
|
result = ResultData.ok();
|
|
}else if (!md5.equals(fileMD5)) {
|
|
}else if (!md5.equals(fileMD5)) {
|
|
- log.error("文件已上传,上传MD5:"+md5+",服务器MD5:"+fileMD5+"。不一致。上传失败");
|
|
|
|
|
|
+ log.info("文件已上传,上传MD5:"+md5+",服务器MD5:"+fileMD5+"。不一致。需要重新上传");
|
|
FileUtils.delFile(yunFilePath.toString());
|
|
FileUtils.delFile(yunFilePath.toString());
|
|
needUpload = true;
|
|
needUpload = true;
|
|
}else if (yunFile.length() != size){
|
|
}else if (yunFile.length() != size){
|
|
- log.error("文件已上传,文件大小不一致。上传失败");
|
|
|
|
|
|
+ log.info("文件已上传,文件大小不一致。需要重新上传");
|
|
FileUtils.delFile(yunFilePath);
|
|
FileUtils.delFile(yunFilePath);
|
|
needUpload = true;
|
|
needUpload = true;
|
|
}
|
|
}
|
|
}else {
|
|
}else {
|
|
- log.error("文件不存在,需要重新上传");
|
|
|
|
|
|
+ log.info("文件不存在,需要重新上传");
|
|
needUpload = true;
|
|
needUpload = true;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -1920,10 +1920,9 @@ public class SceneFileBuildServiceImpl extends ServiceImpl<ISceneFileBuildMapper
|
|
|
|
|
|
if (md5.equals(fileMD5) && uploadFile.length() == size){
|
|
if (md5.equals(fileMD5) && uploadFile.length() == size){
|
|
log.info("文件已上传,MD5和文件大小一致。上传成功");
|
|
log.info("文件已上传,MD5和文件大小一致。上传成功");
|
|
-
|
|
|
|
sceneFileUploadEntity.setUploadStatus(1);
|
|
sceneFileUploadEntity.setUploadStatus(1);
|
|
sceneFileUploadService.save(sceneFileUploadEntity);
|
|
sceneFileUploadService.save(sceneFileUploadEntity);
|
|
- result = ResultData.ok();
|
|
|
|
|
|
+ result = ResultData.ok(sceneFileUploadEntity.getFilePath());
|
|
}else if (!md5.equals(fileMD5)) {
|
|
}else if (!md5.equals(fileMD5)) {
|
|
log.error("文件已上传,上传MD5:"+md5+",服务器MD5:"+fileMD5+"。不一致。上传失败");
|
|
log.error("文件已上传,上传MD5:"+md5+",服务器MD5:"+fileMD5+"。不一致。上传失败");
|
|
sceneFileUploadEntity.setUploadStatus(-1);
|
|
sceneFileUploadEntity.setUploadStatus(-1);
|