diff --git a/order-management-consumer/src/main/java/com/dxhy/order/consumer/modules/manager/service/impl/InvoiceServiceImpl.java b/order-management-consumer/src/main/java/com/dxhy/order/consumer/modules/manager/service/impl/InvoiceServiceImpl.java index f79d0b74..ee671c01 100644 --- a/order-management-consumer/src/main/java/com/dxhy/order/consumer/modules/manager/service/impl/InvoiceServiceImpl.java +++ b/order-management-consumer/src/main/java/com/dxhy/order/consumer/modules/manager/service/impl/InvoiceServiceImpl.java @@ -633,6 +633,14 @@ public class InvoiceServiceImpl implements InvoiceService { } catch (OrderSplitException e) { return R.error().put(OrderManagementConstant.CODE, e.getCode()) .put(OrderManagementConstant.MESSAGE, e.getMessage()); + } finally { + //业务完成后删除redis中的key值 + for (CommonOrderInfo common : commonList) { + String cacheFpqqlsh = String.format(RedisConstant.REDIS_ORDER_LOCK_INVOICE_KEY, common.getOrderInfo().getFpqqlsh()); + if (uuid.equals(redisService.get(cacheFpqqlsh))) { + redisService.del(cacheFpqqlsh); + } + } } /**