|
@@ -104,9 +104,7 @@ public class AddMoldelBuild {
|
|
try {
|
|
try {
|
|
if (token != null) {
|
|
if (token != null) {
|
|
ModelUploadEntity uploadEntity = modelUploadService.findByFileId(param.getFileId());
|
|
ModelUploadEntity uploadEntity = modelUploadService.findByFileId(param.getFileId());
|
|
- if (ObjectUtil.isNotNull(uploadEntity)){
|
|
|
|
- return;
|
|
|
|
- }
|
|
|
|
|
|
+ if (ObjectUtil.isNull(uploadEntity)){
|
|
String locationPath = buildPath + "upload/" + param.getFileId() + "/";
|
|
String locationPath = buildPath + "upload/" + param.getFileId() + "/";
|
|
String objPath = locationPath + param.getFileId() + ".obj";
|
|
String objPath = locationPath + param.getFileId() + ".obj";
|
|
String previewPath = locationPath + param.getFileId() + "_preview.jpg";
|
|
String previewPath = locationPath + param.getFileId() + "_preview.jpg";
|
|
@@ -201,6 +199,7 @@ public class AddMoldelBuild {
|
|
modelUploadEntity.setThumPath(previewPath.replaceAll(buildPath, ""));
|
|
modelUploadEntity.setThumPath(previewPath.replaceAll(buildPath, ""));
|
|
modelUploadService.save(modelUploadEntity);
|
|
modelUploadService.save(modelUploadEntity);
|
|
}
|
|
}
|
|
|
|
+ }
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
e.printStackTrace();
|
|
e.printStackTrace();
|
|
AddMoldelBuild.log.error("直接模型入库报错-{}", e.getMessage());
|
|
AddMoldelBuild.log.error("直接模型入库报错-{}", e.getMessage());
|