From fdbf1d2212919294d41bf38bf02e3236d2ab2993 Mon Sep 17 00:00:00 2001 From: zhenghaoyu Date: Sat, 25 May 2024 16:03:40 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8E=A8=E9=80=81=E5=8C=85=E4=BB=B6=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E9=80=BB=E8=BE=91=E4=BC=98=E5=8C=96=EF=BC=8C=E5=BB=B6?= =?UTF-8?q?=E8=BF=9F2=E7=A7=92=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../comfac/controller/FactoryCommonController.java | 2 +- .../comfac/service/impl/FactoryCommonServiceImpl.java | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/blade-service/logpm-factory/src/main/java/com/logpm/factory/comfac/controller/FactoryCommonController.java b/blade-service/logpm-factory/src/main/java/com/logpm/factory/comfac/controller/FactoryCommonController.java index 9a3eadb85..301d2ff42 100644 --- a/blade-service/logpm-factory/src/main/java/com/logpm/factory/comfac/controller/FactoryCommonController.java +++ b/blade-service/logpm-factory/src/main/java/com/logpm/factory/comfac/controller/FactoryCommonController.java @@ -98,7 +98,7 @@ public class FactoryCommonController { rabbitTemplate.convertAndSend(RabbitConstant.ORDER_STATUS_EXCHANGE, RabbitConstant.ORDER_STATUS_ROUTING, map); map.put("type", "DealWith"); rabbitTemplate.convertAndSend(RabbitConstant.DEAL_WITH_EXCHANGE, RabbitConstant.DEAL_WITH_ROUTING, map,message->{ - message.getMessageProperties().setHeader("x-delay",10000); + message.getMessageProperties().setHeader("x-delay",2000); return message; }); diff --git a/blade-service/logpm-factory/src/main/java/com/logpm/factory/comfac/service/impl/FactoryCommonServiceImpl.java b/blade-service/logpm-factory/src/main/java/com/logpm/factory/comfac/service/impl/FactoryCommonServiceImpl.java index 5471b98b6..bbf7d1256 100644 --- a/blade-service/logpm-factory/src/main/java/com/logpm/factory/comfac/service/impl/FactoryCommonServiceImpl.java +++ b/blade-service/logpm-factory/src/main/java/com/logpm/factory/comfac/service/impl/FactoryCommonServiceImpl.java @@ -167,6 +167,10 @@ public class FactoryCommonServiceImpl implements IFactoryCommonService { } catch (Exception e) { log.error(">>>> 数据推送异常", e); + Boolean exists = bladeRedis.exists(redisKey); + if(Boolean.TRUE.equals(exists)){ + bladeRedis.del(redisKey); + } orderPackageStatusPushFailLogService.saveOrderPackageStatusFaleLog(unitNo, currentWarehouseId, status, operationTime, trayId); log.error(">>>> 保存到错误数据推送记录 {}", unitNo); } @@ -174,6 +178,10 @@ public class FactoryCommonServiceImpl implements IFactoryCommonService { } } } else { + Boolean exists = bladeRedis.exists(redisKey); + if(Boolean.TRUE.equals(exists)){ + bladeRedis.del(redisKey); + } orderPackageStatusPushFailLogService.saveOrderPackageStatusFaleLog(unitNo, currentWarehouseId, status, operationTime, trayId); } }