|
@@ -33,12 +33,10 @@ public class CaseNumServiceImpl extends ServiceImpl<ICaseNumMapper, CaseNumEntit
|
|
|
|
|
|
@Autowired
|
|
|
UploadToOssUtil uploadToOssUtil;
|
|
|
- @Value("${local.obj_path}")
|
|
|
- private String OBJ_PATH;
|
|
|
- @Value("${local.glb_path}")
|
|
|
- private String GLB_PATH;
|
|
|
@Value("${upload.query-path}")
|
|
|
private String queryPath;
|
|
|
+ @Value("${spring.profiles.active}")
|
|
|
+ private String environment;
|
|
|
@Autowired
|
|
|
IModelService modelService;
|
|
|
@Autowired
|
|
@@ -93,7 +91,7 @@ public class CaseNumServiceImpl extends ServiceImpl<ICaseNumMapper, CaseNumEntit
|
|
|
model.setType(param.getType());
|
|
|
model.setModelType("pointcloud"); //深时点云类型
|
|
|
if(param.getType() != 2){ //不为深时
|
|
|
- model.setModelObjUrl(String.format(OBJ_PATH ,num) +"/mesh.obj");
|
|
|
+ model.setModelObjUrl(String.format(FilePath.OBJ_LOCAL_PATH,environment ,num) +"/mesh.obj");
|
|
|
model.setModelGlbUrl(getGlbUrl(param.getType(),num,model));
|
|
|
model.setModelType("glb");
|
|
|
}
|
|
@@ -114,9 +112,9 @@ public class CaseNumServiceImpl extends ServiceImpl<ICaseNumMapper, CaseNumEntit
|
|
|
|
|
|
private String getGlbUrl(Integer type, String num,Model model) {
|
|
|
if(type == 0 || type == 1){ //看看,看见
|
|
|
- String objPath = String.format(OBJ_PATH ,num);
|
|
|
- String glbPath = String.format(GLB_PATH,num) +"/mesh.glb";
|
|
|
- String glbOssPath = String.format(FilePath.GLB_OSS_PATH , num);
|
|
|
+ String objPath = String.format(FilePath.OBJ_LOCAL_PATH ,environment,num);
|
|
|
+ String glbPath = String.format(FilePath.GLB_LOCAL_PATH,environment,num) +"/mesh.glb";
|
|
|
+ String glbOssPath = String.format(FilePath.GLB_OSS_PATH ,environment, num);
|
|
|
// if(uploadToOssUtil.existKey(glbOssPath)){
|
|
|
// return queryPath + "/"+glbOssPath;
|
|
|
// }
|