|
@@ -19,6 +19,7 @@ import com.fdkk.sxz.webApi.service.custom.ICustomProductService;
|
|
import com.rabbitmq.client.AMQP;
|
|
import com.rabbitmq.client.AMQP;
|
|
import com.rabbitmq.client.Channel;
|
|
import com.rabbitmq.client.Channel;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
|
+import lombok.val;
|
|
import org.springframework.amqp.rabbit.annotation.RabbitHandler;
|
|
import org.springframework.amqp.rabbit.annotation.RabbitHandler;
|
|
import org.springframework.amqp.rabbit.annotation.RabbitListener;
|
|
import org.springframework.amqp.rabbit.annotation.RabbitListener;
|
|
import org.springframework.amqp.support.AmqpHeaders;
|
|
import org.springframework.amqp.support.AmqpHeaders;
|
|
@@ -92,7 +93,7 @@ public class AddMoldelBuild {
|
|
public void addmodelto3d(Message<RequestRenovationPartsDetailManager> message) {
|
|
public void addmodelto3d(Message<RequestRenovationPartsDetailManager> message) {
|
|
AddMoldelBuild.log.info("模型addmodelto3d:" + message.getPayload() + ",开始同步");
|
|
AddMoldelBuild.log.info("模型addmodelto3d:" + message.getPayload() + ",开始同步");
|
|
try {
|
|
try {
|
|
- Thread.sleep(1000L*15);
|
|
|
|
|
|
+ Thread.sleep(1000L*2);
|
|
} catch (InterruptedException e) {
|
|
} catch (InterruptedException e) {
|
|
e.printStackTrace();
|
|
e.printStackTrace();
|
|
}
|
|
}
|
|
@@ -102,6 +103,10 @@ public class AddMoldelBuild {
|
|
String token = RedisUtil.tryLock(param.getFileId().toString() + "syncModel", 60 * 1000);
|
|
String token = RedisUtil.tryLock(param.getFileId().toString() + "syncModel", 60 * 1000);
|
|
try {
|
|
try {
|
|
if (token != null) {
|
|
if (token != null) {
|
|
|
|
+ ModelUploadEntity uploadEntity = modelUploadService.findByFileId(param.getFileId());
|
|
|
|
+ if (ObjectUtil.isNotNull(uploadEntity)){
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
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";
|