订单详情

This commit is contained in:
张松
2025-11-28 16:46:25 +08:00
parent 0b0e3ebba3
commit b431c0b828
4 changed files with 22 additions and 0 deletions

View File

@@ -153,4 +153,15 @@ public class RabbitConfig {
public Binding bindingOrderProductStatusExchange(Queue orderProductStatusQueue, DirectExchange exchange) { public Binding bindingOrderProductStatusExchange(Queue orderProductStatusQueue, DirectExchange exchange) {
return BindingBuilder.bind(orderProductStatusQueue).to(exchange).with(activeProfile + "-" + RabbitConstants.Queue.ORDER_PRODUCT_STATUS_QUEUE); 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);
}
} }

View File

@@ -23,6 +23,7 @@ public interface RabbitConstants {
* 订单商品状态队列 * 订单商品状态队列
*/ */
public static final String ORDER_PRODUCT_STATUS_QUEUE = "order.product.status.queue"; 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 模版审核 * 1,2,applySmsTemp 模版审核

View File

@@ -128,6 +128,14 @@ public class RabbitPublisher {
sendMsg(RabbitConstants.Queue.ORDER_PRODUCT_STATUS_QUEUE, qrContent); 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) { private void sendMsg(String queue, String msg) {
log.info("开始发送mq消息,exchange:{}, queue: {}, msg: {}", activeProfile + "-" + RabbitConstants.Exchange.CASH_EXCHANGE, activeProfile + "-" + queue, 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); rabbitTemplate.convertAndSend(activeProfile + "-" + RabbitConstants.Exchange.CASH_EXCHANGE, activeProfile + "-" + queue, msg);

View File

@@ -1785,6 +1785,8 @@ public class OrderInfoCustomServiceImpl implements OrderInfoCustomService {
.eq(OrderDetail::getId, detailStatusDTO.getOrderDetailId()).update(); .eq(OrderDetail::getId, detailStatusDTO.getOrderDetailId()).update();
} }
} }
rabbitPublisher.sendOrderDetailStatusMsg(shopId.toString());
return true; return true;
} }
} }