订单详情
This commit is contained in:
@@ -153,4 +153,15 @@ public class RabbitConfig {
|
||||
public Binding bindingOrderProductStatusExchange(Queue orderProductStatusQueue, DirectExchange exchange) {
|
||||
return BindingBuilder.bind(orderProductStatusQueue).to(exchange).with(activeProfile + "-" + RabbitConstants.Queue.ORDER_PRODUCT_STATUS_QUEUE);
|
||||
}
|
||||
|
||||
|
||||
//------------------------------------------------------ 订单详情状态
|
||||
@Bean
|
||||
public Queue orderDetailStatusQueue() {
|
||||
return new Queue(activeProfile + "-" + RabbitConstants.Queue.ORDER_DETAIL_STATUS_QUEUE, true);
|
||||
}
|
||||
@Bean
|
||||
public Binding bindingOrderDetailStatusExchange(Queue orderDetailStatusQueue, DirectExchange exchange) {
|
||||
return BindingBuilder.bind(orderDetailStatusQueue).to(exchange).with(activeProfile + "-" + RabbitConstants.Queue.ORDER_DETAIL_STATUS_QUEUE);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,6 +23,7 @@ public interface RabbitConstants {
|
||||
* 订单商品状态队列
|
||||
*/
|
||||
public static final String ORDER_PRODUCT_STATUS_QUEUE = "order.product.status.queue";
|
||||
public static final String ORDER_DETAIL_STATUS_QUEUE = "order.detail.change.queue";
|
||||
|
||||
/**
|
||||
* 1,2,applySmsTemp 模版审核
|
||||
|
||||
@@ -128,6 +128,14 @@ public class RabbitPublisher {
|
||||
sendMsg(RabbitConstants.Queue.ORDER_PRODUCT_STATUS_QUEUE, qrContent);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 订单商品状态消息
|
||||
*/
|
||||
public void sendOrderDetailStatusMsg(String shopId) {
|
||||
sendMsg(RabbitConstants.Queue.ORDER_DETAIL_STATUS_QUEUE, shopId);
|
||||
}
|
||||
|
||||
private void sendMsg(String queue, String msg) {
|
||||
log.info("开始发送mq消息,exchange:{}, queue: {}, msg: {}", activeProfile + "-" + RabbitConstants.Exchange.CASH_EXCHANGE, activeProfile + "-" + queue, msg);
|
||||
rabbitTemplate.convertAndSend(activeProfile + "-" + RabbitConstants.Exchange.CASH_EXCHANGE, activeProfile + "-" + queue, msg);
|
||||
|
||||
@@ -1785,6 +1785,8 @@ public class OrderInfoCustomServiceImpl implements OrderInfoCustomService {
|
||||
.eq(OrderDetail::getId, detailStatusDTO.getOrderDetailId()).update();
|
||||
}
|
||||
}
|
||||
|
||||
rabbitPublisher.sendOrderDetailStatusMsg(shopId.toString());
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user