MQ
This commit is contained in:
@@ -119,6 +119,12 @@ public class RabbitConfig {
|
||||
|
||||
|
||||
//------------------------------------------------------ 申请短信模板队列
|
||||
/**
|
||||
* 1,2,applySmsTemp 模版审核
|
||||
* 1,2,sendMarkSms 发送营销短信
|
||||
* 1,2,sendWechatTemp 发送微信模版消息
|
||||
*
|
||||
*/
|
||||
@Bean
|
||||
public Queue applySmsTemplateQueue() {
|
||||
return new Queue(activeProfile + "-" + RabbitConstants.Queue.APPLY_SMS_TEMPLATE_QUEUE, true);
|
||||
@@ -128,26 +134,6 @@ public class RabbitConfig {
|
||||
return BindingBuilder.bind(applySmsTemplateQueue).to(exchange).with(activeProfile + "-" + RabbitConstants.Queue.APPLY_SMS_TEMPLATE_QUEUE);
|
||||
}
|
||||
|
||||
//------------------------------------------------------ 发送微信模板队列
|
||||
@Bean
|
||||
public Queue sendWechatTemplateQueue() {
|
||||
return new Queue(activeProfile + "-" + RabbitConstants.Queue.SEND_WECHAT_TEMPLATE_QUEUE, true);
|
||||
}
|
||||
@Bean
|
||||
public Binding bindingSendWechatTemplateExchange(Queue sendWechatTemplateQueue, DirectExchange exchange) {
|
||||
return BindingBuilder.bind(sendWechatTemplateQueue).to(exchange).with(activeProfile + "-" + RabbitConstants.Queue.SEND_WECHAT_TEMPLATE_QUEUE);
|
||||
}
|
||||
|
||||
//------------------------------------------------------ 发送营销短信队列
|
||||
@Bean
|
||||
public Queue sendMarketSmsQueue() {
|
||||
return new Queue(activeProfile + "-" + RabbitConstants.Queue.SEND_MARKET_SMS_QUEUE, true);
|
||||
}
|
||||
@Bean
|
||||
public Binding bindingSendMarketSmsExchange(Queue sendMarketSmsQueue, DirectExchange exchange) {
|
||||
return BindingBuilder.bind(sendMarketSmsQueue).to(exchange).with(activeProfile + "-" + RabbitConstants.Queue.SEND_MARKET_SMS_QUEUE);
|
||||
}
|
||||
|
||||
//------------------------------------------------------ 生日礼品短信队列
|
||||
@Bean
|
||||
public Queue birthdayGiftSmsQueue() {
|
||||
|
||||
@@ -20,17 +20,12 @@ public interface RabbitConstants {
|
||||
public static final String PRODUCT_INFO_CHANGE_QUEUE = "product.info.change.queue";
|
||||
|
||||
/**
|
||||
* 申请短信模板队列
|
||||
* 1,2,applySmsTemp 模版审核
|
||||
* 1,2,sendMarkSms 发送营销短信
|
||||
* 1,2,sendWechatTemp 发送微信模版消息
|
||||
*
|
||||
*/
|
||||
public static final String APPLY_SMS_TEMPLATE_QUEUE = "apply.sms.temp";
|
||||
/**
|
||||
* 发送微信模板队列
|
||||
*/
|
||||
public static final String SEND_WECHAT_TEMPLATE_QUEUE = "send.wechat.temp";
|
||||
/**
|
||||
* 发送营销短信队列
|
||||
*/
|
||||
public static final String SEND_MARKET_SMS_QUEUE = "send.mark.sms";
|
||||
/**
|
||||
* 生日礼品短信队列
|
||||
*/
|
||||
|
||||
@@ -102,30 +102,14 @@ public class RabbitPublisher {
|
||||
}
|
||||
|
||||
/**
|
||||
* 申请短信模板消息
|
||||
*
|
||||
* @param param 申请短信模板请求 shop_id,sms_shop_template.id
|
||||
* 1,2,applySmsTemp 模版审核 shop_id,sms_shop_template.id,applySmsTemp
|
||||
* 1,2,sendMarkSms 发送营销短信 shop_id,sms_push_event.id,sendMarkSms
|
||||
* 1,2,sendWechatTemp 发送微信模版消息 ?
|
||||
* @param param 店铺Id,主键Id
|
||||
* @param type applySmsTemp,sendMarkSms,sendWechatTemp
|
||||
*/
|
||||
public void sendApplySmsTemplateMsg(String param) {
|
||||
sendMsg(RabbitConstants.Queue.APPLY_SMS_TEMPLATE_QUEUE, param);
|
||||
}
|
||||
|
||||
/**
|
||||
* 发送微信模板消息
|
||||
*
|
||||
* @param param 发送微信模板请求 shop_id,sms_push_event.id
|
||||
*/
|
||||
public void sendWechatTemplateMsg(String param) {
|
||||
sendMsg(RabbitConstants.Queue.SEND_WECHAT_TEMPLATE_QUEUE, param);
|
||||
}
|
||||
|
||||
/**
|
||||
* 发送营销短信队列
|
||||
*
|
||||
* @param param
|
||||
*/
|
||||
public void sendMarketSmsMsg(String param) {
|
||||
sendMsg(RabbitConstants.Queue.SEND_MARKET_SMS_QUEUE, param);
|
||||
public void sendApplySmsMsg(String param, String type) {
|
||||
sendMsg(RabbitConstants.Queue.APPLY_SMS_TEMPLATE_QUEUE, param + "," + type);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user