|
@@ -14,6 +14,7 @@ import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
import com.fdkankan.common.constant.ErrorCode;
|
|
|
import com.fdkankan.common.constant.FileBizType;
|
|
|
+import com.fdkankan.common.constant.ModelKind;
|
|
|
import com.fdkankan.common.exception.BusinessException;
|
|
|
import com.fdkankan.common.util.FileUtils;
|
|
|
import com.fdkankan.model.constants.ConstantFileName;
|
|
@@ -1051,11 +1052,6 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
|
|
|
return this.downloadModel4Dam(num, bucket);
|
|
|
}
|
|
|
|
|
|
- @Override
|
|
|
- public ScenePro getByNum(String num) {
|
|
|
- return this.getOne(new LambdaQueryWrapper<ScenePro>().eq(ScenePro::getNum, num));
|
|
|
- }
|
|
|
-
|
|
|
private ResultData downloadModel43dtiles(String num, String bucket, ScenePlusExt scenePlusExt, SceneEditInfo sceneEditInfo){
|
|
|
|
|
|
//下载mesh到本地
|
|
@@ -1064,15 +1060,15 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
|
|
|
String zipName = num + "_mesh.zip";
|
|
|
String zipFilePath = String.format(ConstantFilePath.SCENE_DATA_PATH_V4, num) + zipName;
|
|
|
//下载
|
|
|
- fYunFileService.downloadFileByCommand(bucket, meshLocalPath, meshOssPath);
|
|
|
+ ossUtil.downloadFile(meshOssPath, meshLocalPath);
|
|
|
//打包
|
|
|
ZipUtil.zip(meshLocalPath,zipFilePath);
|
|
|
//上传压缩包
|
|
|
- fYunFileService.uploadFile(bucket, zipFilePath, "downloads/extras/" + zipName);
|
|
|
+ ossUtil.uploadFile("downloads/extras/" + zipName, zipFilePath, false);
|
|
|
//删除本地文件
|
|
|
FileUtil.del(meshLocalPath);
|
|
|
FileUtil.del(zipFilePath);
|
|
|
- String url = ossUrlPrefix + "downloads/extras/" + zipName + "?t=" + Calendar.getInstance().getTimeInMillis();
|
|
|
+ String url = "downloads/extras/" + zipName + "?t=" + Calendar.getInstance().getTimeInMillis();
|
|
|
return ResultData.ok(url);
|
|
|
}
|
|
|
|
|
@@ -1098,7 +1094,7 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
|
|
|
//V3版本去oss下载2048模型
|
|
|
String meshPath = String.format(ConstantFilePath.DATABUFFER_FORMAT, num) + "mesh";
|
|
|
FileUtils.deleteDirectory(meshPath);
|
|
|
- fYunFileService.downloadFileByCommand(bucket, meshPath, dataViewPath + "mesh");
|
|
|
+ ossUtil.downloadFile(dataViewPath + "mesh", meshPath);
|
|
|
log.info("meshPath="+meshPath);
|
|
|
if(!new File(meshPath).exists() || new File(meshPath).listFiles().length < 1){
|
|
|
throw new BusinessException(ErrorCode.FAILURE_CODE_7006);
|
|
@@ -1129,8 +1125,8 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
|
|
|
//打包
|
|
|
ZipUtil.zip(meshPath, zipPath);
|
|
|
//上传压缩包
|
|
|
- fYunFileService.uploadFile(bucket, zipPath, "downloads/extras/" + zipName);
|
|
|
- String url = ossUrlPrefix + "downloads/extras/" + zipName + "?t=" + Calendar.getInstance().getTimeInMillis();
|
|
|
+ ossUtil.uploadFile("downloads/extras/" + zipName, zipPath, false);
|
|
|
+ String url = "downloads/extras/" + zipName + "?t=" + Calendar.getInstance().getTimeInMillis();
|
|
|
FileUtil.del(zipPath);
|
|
|
return ResultData.ok(url);
|
|
|
}
|