|
@@ -305,9 +305,9 @@ public class ModelServiceImpl extends ServiceImpl<IModelMapper, Model> implement
|
|
modelEntity.setModelId(null);
|
|
modelEntity.setModelId(null);
|
|
this.save(modelEntity);
|
|
this.save(modelEntity);
|
|
if(StringUtils.isNotBlank(modelEntity.getModelGlbUrl())){
|
|
if(StringUtils.isNotBlank(modelEntity.getModelGlbUrl())){
|
|
- String modelObjUrl = modelEntity.getModelObjUrl();
|
|
|
|
- copyOssResource(modelObjUrl,oldId,modelEntity.getModelId());
|
|
|
|
- String newModelObjUrl = modelObjUrl.replaceAll(oldId+"",modelEntity.getModelId()+"");
|
|
|
|
|
|
+ String modelGlbUrl = modelEntity.getModelGlbUrl();
|
|
|
|
+ copyOssResource(modelGlbUrl,oldId,modelEntity.getModelId());
|
|
|
|
+ String newModelObjUrl = modelGlbUrl.replaceAll(oldId+"",modelEntity.getModelId()+"");
|
|
modelEntity.setModelGlbUrl(newModelObjUrl);
|
|
modelEntity.setModelGlbUrl(newModelObjUrl);
|
|
this.updateById(modelEntity);
|
|
this.updateById(modelEntity);
|
|
}
|
|
}
|
|
@@ -315,8 +315,8 @@ public class ModelServiceImpl extends ServiceImpl<IModelMapper, Model> implement
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
- private void copyOssResource(String modelObjUrl,Integer oldModelId,Integer newModelId) {
|
|
|
|
- JSONArray jsonArray = JSONArray.parseArray(modelObjUrl);
|
|
|
|
|
|
+ private void copyOssResource(String modelGlbUrl,Integer oldModelId,Integer newModelId) {
|
|
|
|
+ JSONArray jsonArray = JSONArray.parseArray(modelGlbUrl);
|
|
for (Object object : jsonArray) {
|
|
for (Object object : jsonArray) {
|
|
String ossUrl = (String) object;
|
|
String ossUrl = (String) object;
|
|
String oldOssPath = ossUrl.replaceAll(queryPath,"");
|
|
String oldOssPath = ossUrl.replaceAll(queryPath,"");
|