|
@@ -1,6 +1,7 @@
|
|
|
package com.uas.platform.b2b.support.mq;
|
|
package com.uas.platform.b2b.support.mq;
|
|
|
|
|
|
|
|
import com.alibaba.fastjson.JSON;
|
|
import com.alibaba.fastjson.JSON;
|
|
|
|
|
+import com.uas.platform.b2b.support.mq.config.RabbitMqConfig;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
import org.slf4j.Logger;
|
|
import org.slf4j.Logger;
|
|
|
import org.slf4j.LoggerFactory;
|
|
import org.slf4j.LoggerFactory;
|
|
@@ -36,6 +37,8 @@ public class RabbitSendService implements RabbitTemplate.ConfirmCallback, Rabbit
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
|
|
+ * 发送消息
|
|
|
|
|
+ *
|
|
|
* @param queueName 队列名
|
|
* @param queueName 队列名
|
|
|
* @param userId 用户ID
|
|
* @param userId 用户ID
|
|
|
* @param appId 应用号
|
|
* @param appId 应用号
|
|
@@ -52,6 +55,18 @@ public class RabbitSendService implements RabbitTemplate.ConfirmCallback, Rabbit
|
|
|
return sendMessage(queueName, messageInfo);
|
|
return sendMessage(queueName, messageInfo);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 发送消息,用默认的userId和appId
|
|
|
|
|
+ *
|
|
|
|
|
+ * @param queueName 队列名
|
|
|
|
|
+ * @param bizType 业务类型
|
|
|
|
|
+ * @param bizId 业务id
|
|
|
|
|
+ * @return
|
|
|
|
|
+ */
|
|
|
|
|
+ public String sendMessage(String queueName, String bizType, String bizId) {
|
|
|
|
|
+ return sendMessage(queueName, RabbitMqConfig.RABBIT_USER_ID, RabbitMqConfig.RABBIT_APP_ID, bizType, bizId);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
* 发送消息
|
|
* 发送消息
|