提交 be53db18 authored 作者: huyufan's avatar huyufan

修改BUG

上级 55d0cd69
...@@ -103,7 +103,6 @@ public class GoodsOrderController { ...@@ -103,7 +103,6 @@ public class GoodsOrderController {
} }
} }
rabbitTemplate.send(RabbitKeyConstants.ORDER_POSTED_EXCHANGE, RabbitKeyConstants.ORDER_POSTED_ROUTE_KEY, MessageBuilder.withBody(orderNo.toString().getBytes()).build());
Message message = MessageBuilder.withBody(orderNo.getBytes()).build(); Message message = MessageBuilder.withBody(orderNo.getBytes()).build();
long epochMilli = 0L; long epochMilli = 0L;
if (sendLazyTime.isAfter(now)) { if (sendLazyTime.isAfter(now)) {
...@@ -120,6 +119,7 @@ public class GoodsOrderController { ...@@ -120,6 +119,7 @@ public class GoodsOrderController {
); );
} else { } else {
log.info("epochMilli时间不为0,时间为:{}", epochMilli); log.info("epochMilli时间不为0,时间为:{}", epochMilli);
rabbitTemplate.send(RabbitKeyConstants.ORDER_POSTED_EXCHANGE, RabbitKeyConstants.ORDER_POSTED_ROUTE_KEY, MessageBuilder.withBody(orderNo.toString().getBytes()).build());
message.getMessageProperties().setExpiration(String.valueOf(epochMilli)); message.getMessageProperties().setExpiration(String.valueOf(epochMilli));
rabbitTemplate.send( rabbitTemplate.send(
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论