处理 设备在线 发消息

This commit is contained in:
gong
2025-11-24 16:37:56 +08:00
parent e76a85b521
commit 7146128b4c
15 changed files with 156 additions and 38 deletions

View File

@@ -143,4 +143,14 @@ public class RabbitConfig {
public Binding bindingBirthdayGiftSmsExchange(Queue birthdayGiftSmsQueue, DirectExchange exchange) {
return BindingBuilder.bind(birthdayGiftSmsQueue).to(exchange).with(activeProfile + "-" + RabbitConstants.Queue.BIRTHDAY_GIFT_SMS_QUEUE);
}
//------------------------------------------------------ 订单商品状态
@Bean
public Queue orderProductStatusQueue() {
return new Queue(activeProfile + "-" + RabbitConstants.Queue.ORDER_PRODUCT_STATUS_QUEUE, true);
}
@Bean
public Binding bindingOrderProductStatusExchange(Queue orderProductStatusQueue, DirectExchange exchange) {
return BindingBuilder.bind(orderProductStatusQueue).to(exchange).with(activeProfile + "-" + RabbitConstants.Queue.ORDER_PRODUCT_STATUS_QUEUE);
}
}

View File

@@ -19,6 +19,11 @@ public interface RabbitConstants {
public static final String CALL_TABLE_PRINT_QUEUE = "call.table.print.queue";
public static final String PRODUCT_INFO_CHANGE_QUEUE = "product.info.change.queue";
/**
* 订单商品状态队列
*/
public static final String ORDER_PRODUCT_STATUS_QUEUE = "order.product.status.queue";
/**
* 1,2,applySmsTemp 模版审核
* 1,2,sendMarkSms 发送营销短信

View File

@@ -121,6 +121,13 @@ public class RabbitPublisher {
sendMsg(RabbitConstants.Queue.BIRTHDAY_GIFT_SMS_QUEUE, param);
}
/**
* 订单商品状态消息
*/
public void sendOrderProductStatusMsg(String qrContent) {
sendMsg(RabbitConstants.Queue.ORDER_PRODUCT_STATUS_QUEUE, qrContent);
}
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);