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

修改BUG

上级 a9aff16b
......@@ -107,14 +107,20 @@ public class GoodsOrderController {
Message message = MessageBuilder.withBody(orderNo.getBytes()).build();
long epochMilli = 0L;
if (sendLazyTime.isAfter(now)) {
//选择时间在当前时间之后,则设置延迟队列时间
epochMilli = sendLazyTime.minusMinutes(now.getMinute()).getMinute() * 60 * 1000;
log.info("选择时间在当前时间之后,则设置延迟队列时间,时间为:{}", epochMilli);
//选择时间在当前时间之后,则设置延迟队列时间
}
if (epochMilli == 0L) {
log.info("epochMilli时间为0,时间为:{}", epochMilli);
rabbitTemplate.send(
RabbitKeyConstants.ORDER_ON_DEAD_EXCHANGE, RabbitKeyConstants.ORDER_ON_ROUTE_KEY, message
RabbitKeyConstants.ORDER_ON_DEAD_EXCHANGE, RabbitKeyConstants.ORDER_ON_DEAD_ROUTE_KEY, message
);
} else {
log.info("epochMilli时间不为0,时间为:{}", epochMilli);
message.getMessageProperties().setExpiration(String.valueOf(epochMilli));
rabbitTemplate.send(
RabbitKeyConstants.ORDER_ON_EXCHANGE, RabbitKeyConstants.ORDER_ON_ROUTE_KEY, message
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论