历史订单 赠送
退款库存 回滚 日志打印 截断200
This commit is contained in:
@@ -56,6 +56,11 @@ public class RabbitConfig {
|
||||
return new Queue(activeProfile + "-" + RabbitConstants.Queue.PRODUCT_INFO_CHANGE_QUEUE, true);
|
||||
}
|
||||
|
||||
@Bean
|
||||
public Queue orderRefundQueue() {
|
||||
return new Queue(activeProfile + "-" + RabbitConstants.Queue.ORDER_REFUND_QUEUE, true);
|
||||
}
|
||||
|
||||
@Bean
|
||||
@Primary
|
||||
public DirectExchange directExchange() {
|
||||
@@ -82,4 +87,9 @@ public class RabbitConfig {
|
||||
public Binding bindingProductInfoChange(Queue productInfoChangeQueue, DirectExchange exchange) {
|
||||
return BindingBuilder.bind(productInfoChangeQueue).to(exchange).with(activeProfile + "-" + RabbitConstants.Queue.PRODUCT_INFO_CHANGE_QUEUE);
|
||||
}
|
||||
|
||||
@Bean
|
||||
public Binding bindingOrderRefundExchange(Queue orderRefundQueue, DirectExchange exchange) {
|
||||
return BindingBuilder.bind(orderRefundQueue).to(exchange).with(activeProfile + "-" + RabbitConstants.Queue.ORDER_REFUND_QUEUE);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,6 +11,7 @@ public interface RabbitConstants {
|
||||
|
||||
class Queue {
|
||||
public static final String ORDER_STOCK_QUEUE = "order.stock.queue";
|
||||
public static final String ORDER_REFUND_QUEUE = "order.refund.queue";
|
||||
public static final String ORDER_CANCEL_QUEUE = "order.cancel.queue";
|
||||
public static final String ORDER_PRINT_QUEUE = "order.print.queue";
|
||||
public static final String ORDER_MACHINE_PRINT_QUEUE = "order.machine.print.queue";
|
||||
|
||||
@@ -34,6 +34,14 @@ public class RabbitPublisher {
|
||||
sendMsg(RabbitConstants.Queue.ORDER_STOCK_QUEUE, orderId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 退款库存回滚消息(未校验商品退款是否退回库存)
|
||||
* @param refundMap Map <Long,BigDecimal> 商品Id,退单数量
|
||||
*/
|
||||
public void sendOrderRefundMsg(String refundMap) {
|
||||
sendMsg(RabbitConstants.Queue.ORDER_STOCK_QUEUE, refundMap);
|
||||
}
|
||||
|
||||
/**
|
||||
* 订单打印消息
|
||||
* @param orderId 订单id
|
||||
|
||||
Reference in New Issue
Block a user