|
@@ -149,6 +149,7 @@ public class ModelServiceImpl extends ServiceImpl<IModelMapper, Model> implement
|
|
|
for (ModelVo model : page.getRecords()) {
|
|
|
if(model.getModelId() == null){
|
|
|
model.setCreateStatus(0);
|
|
|
+ model.setModelTitle(model.getUploadTitle());
|
|
|
}
|
|
|
if( model.getModelId() != null && StringUtils.isEmpty(model.getNum()) ) {
|
|
|
model.setNum(model.getModelId().toString());
|
|
@@ -193,16 +194,15 @@ public class ModelServiceImpl extends ServiceImpl<IModelMapper, Model> implement
|
|
|
throw new BusinessException(ResultCode.CASE_USE.code, String.format(ResultCode.CASE_USE.msg,title));
|
|
|
}
|
|
|
Model model = this.getById(modelId);
|
|
|
- if(model == null ){
|
|
|
- throw new BusinessException(ResultCode.MODEL_NOT_EXIST);
|
|
|
- }
|
|
|
- this.removeById(modelId);
|
|
|
- fusionNumService.deleteByModelId(modelId);
|
|
|
- if(StringUtils.isNotBlank(model.getModelGlbUrl())){
|
|
|
- uploadService.deleteOssUrl(model.getModelGlbUrl());
|
|
|
- }
|
|
|
- if(model.getUploadId() != null){
|
|
|
- this.updateUploadId(model.getModelId(),null);
|
|
|
+ if(model != null ){
|
|
|
+ this.removeById(modelId);
|
|
|
+ fusionNumService.deleteByModelId(modelId);
|
|
|
+ if(StringUtils.isNotBlank(model.getModelGlbUrl())){
|
|
|
+ uploadService.deleteOssUrl(model.getModelGlbUrl());
|
|
|
+ }
|
|
|
+ if(model.getUploadId() != null){
|
|
|
+ this.updateUploadId(model.getModelId(),null);
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
if(modelId == null && uploadId != null){
|