Commit 8c92088d authored by honghy's avatar honghy

修改发送消息的消费者

parent 6f3e1ae4
package cn.iocoder.yudao.module.system.mq.consumer.sms; package cn.iocoder.yudao.module.system.mq.consumer.sms;
import cn.iocoder.yudao.framework.mq.core.stream.AbstractStreamMessageListener; import cn.iocoder.yudao.framework.mq.core.pubsub.AbstractChannelMessageListener;
import cn.iocoder.yudao.module.system.mq.message.sms.SmsSendMessage;
import cn.iocoder.yudao.module.system.mq.message.sms.SmsSendMessageV2; import cn.iocoder.yudao.module.system.mq.message.sms.SmsSendMessageV2;
import cn.iocoder.yudao.module.system.service.sms.SmsSendService; import cn.iocoder.yudao.module.system.service.sms.SmsSendService;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
...@@ -10,13 +9,13 @@ import org.springframework.stereotype.Component; ...@@ -10,13 +9,13 @@ import org.springframework.stereotype.Component;
import javax.annotation.Resource; import javax.annotation.Resource;
/** /**
* 针对 {@link SmsSendMessage} 的消费者 * 针对 {@link SmsSendConsumerV2} 的消费者
* *
* @author zzf * @author zzf
*/ */
@Component @Component
@Slf4j @Slf4j
public class SmsSendConsumerV2 extends AbstractStreamMessageListener<SmsSendMessageV2> { public class SmsSendConsumerV2 extends AbstractChannelMessageListener<SmsSendMessageV2> {
@Resource @Resource
private SmsSendService smsSendService; private SmsSendService smsSendService;
......
package cn.iocoder.yudao.module.system.mq.message.sms; package cn.iocoder.yudao.module.system.mq.message.sms;
import cn.iocoder.yudao.framework.common.util.json.core.KeyValue; 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.framework.sms.core.client.dto.SmsTemplateDTO;
import cn.iocoder.yudao.module.system.dal.dataobject.sms.SmsTemplateDO;
import lombok.Data; import lombok.Data;
import lombok.EqualsAndHashCode; import lombok.EqualsAndHashCode;
...@@ -17,7 +16,7 @@ import java.util.List; ...@@ -17,7 +16,7 @@ import java.util.List;
*/ */
@Data @Data
@EqualsAndHashCode(callSuper = true) @EqualsAndHashCode(callSuper = true)
public class SmsSendMessageV2 extends AbstractStreamMessage { public class SmsSendMessageV2 extends AbstractChannelMessage {
/** /**
* 短信日志编号 * 短信日志编号
...@@ -43,7 +42,7 @@ public class SmsSendMessageV2 extends AbstractStreamMessage { ...@@ -43,7 +42,7 @@ public class SmsSendMessageV2 extends AbstractStreamMessage {
private List<KeyValue<String, Object>> templateParams; private List<KeyValue<String, Object>> templateParams;
@Override @Override
public String getStreamKey() { public String getChannel() {
return "system.sms.send"; 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