Commit 8c92088d authored by honghy's avatar honghy

修改发送消息的消费者

parent 6f3e1ae4
package cn.iocoder.yudao.module.system.mq.consumer.sms;
import cn.iocoder.yudao.framework.mq.core.stream.AbstractStreamMessageListener;
import cn.iocoder.yudao.module.system.mq.message.sms.SmsSendMessage;
import cn.iocoder.yudao.framework.mq.core.pubsub.AbstractChannelMessageListener;
import cn.iocoder.yudao.module.system.mq.message.sms.SmsSendMessageV2;
import cn.iocoder.yudao.module.system.service.sms.SmsSendService;
import lombok.extern.slf4j.Slf4j;
......@@ -10,13 +9,13 @@ import org.springframework.stereotype.Component;
import javax.annotation.Resource;
/**
* 针对 {@link SmsSendMessage} 的消费者
* 针对 {@link SmsSendConsumerV2} 的消费者
*
* @author zzf
*/
@Component
@Slf4j
public class SmsSendConsumerV2 extends AbstractStreamMessageListener<SmsSendMessageV2> {
public class SmsSendConsumerV2 extends AbstractChannelMessageListener<SmsSendMessageV2> {
@Resource
private SmsSendService smsSendService;
......
package cn.iocoder.yudao.module.system.mq.message.sms;
import cn.iocoder.yudao.framework.common.util.json.core.KeyValue;
import cn.iocoder.yudao.framework.mq.core.stream.AbstractStreamMessage;
import cn.iocoder.yudao.framework.mq.core.pubsub.AbstractChannelMessage;
import cn.iocoder.yudao.framework.sms.core.client.dto.SmsTemplateDTO;
import cn.iocoder.yudao.module.system.dal.dataobject.sms.SmsTemplateDO;
import lombok.Data;
import lombok.EqualsAndHashCode;
......@@ -17,7 +16,7 @@ import java.util.List;
*/
@Data
@EqualsAndHashCode(callSuper = true)
public class SmsSendMessageV2 extends AbstractStreamMessage {
public class SmsSendMessageV2 extends AbstractChannelMessage {
/**
* 短信日志编号
......@@ -43,7 +42,7 @@ public class SmsSendMessageV2 extends AbstractStreamMessage {
private List<KeyValue<String, Object>> templateParams;
@Override
public String getStreamKey() {
public String getChannel() {
return "system.sms.send";
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment