parent
e205129943
commit
91e0af0944
@ -1,29 +0,0 @@
|
|||||||
package cn.iocoder.yudao.module.system.mq.consumer.sms;
|
|
||||||
|
|
||||||
import cn.iocoder.yudao.module.system.mq.message.sms.SmsChannelRefreshMessage;
|
|
||||||
import cn.iocoder.yudao.module.system.service.sms.SmsChannelService;
|
|
||||||
import lombok.extern.slf4j.Slf4j;
|
|
||||||
import org.springframework.context.event.EventListener;
|
|
||||||
import org.springframework.stereotype.Component;
|
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 针对 {@link SmsChannelRefreshMessage} 的消费者
|
|
||||||
*
|
|
||||||
* @author 芋道源码
|
|
||||||
*/
|
|
||||||
@Component
|
|
||||||
@Slf4j
|
|
||||||
public class SmsChannelRefreshConsumer {
|
|
||||||
|
|
||||||
@Resource
|
|
||||||
private SmsChannelService smsChannelService;
|
|
||||||
|
|
||||||
@EventListener
|
|
||||||
public void execute(SmsChannelRefreshMessage message) {
|
|
||||||
log.info("[execute][收到 SmsChannel 刷新消息]");
|
|
||||||
smsChannelService.initLocalCache();
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@ -1,23 +0,0 @@
|
|||||||
package cn.iocoder.yudao.module.system.mq.message.sms;
|
|
||||||
|
|
||||||
import lombok.Data;
|
|
||||||
import lombok.EqualsAndHashCode;
|
|
||||||
import org.springframework.cloud.bus.event.RemoteApplicationEvent;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 短信渠道的数据刷新 Message
|
|
||||||
*
|
|
||||||
* @author 芋道源码
|
|
||||||
*/
|
|
||||||
@Data
|
|
||||||
@EqualsAndHashCode(callSuper = true)
|
|
||||||
public class SmsChannelRefreshMessage extends RemoteApplicationEvent {
|
|
||||||
|
|
||||||
public SmsChannelRefreshMessage() {
|
|
||||||
}
|
|
||||||
|
|
||||||
public SmsChannelRefreshMessage(Object source, String originService, String destinationService) {
|
|
||||||
super(source, originService, DEFAULT_DESTINATION_FACTORY.getDestination(destinationService));
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@ -1,23 +0,0 @@
|
|||||||
package cn.iocoder.yudao.module.system.mq.message.sms;
|
|
||||||
|
|
||||||
import lombok.Data;
|
|
||||||
import lombok.EqualsAndHashCode;
|
|
||||||
import org.springframework.cloud.bus.event.RemoteApplicationEvent;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 短信模板的数据刷新 Message
|
|
||||||
*
|
|
||||||
* @author 芋道源码
|
|
||||||
*/
|
|
||||||
@Data
|
|
||||||
@EqualsAndHashCode(callSuper = true)
|
|
||||||
public class SmsTemplateRefreshMessage extends RemoteApplicationEvent {
|
|
||||||
|
|
||||||
public SmsTemplateRefreshMessage() {
|
|
||||||
}
|
|
||||||
|
|
||||||
public SmsTemplateRefreshMessage(Object source, String originService, String destinationService) {
|
|
||||||
super(source, originService, DEFAULT_DESTINATION_FACTORY.getDestination(destinationService));
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
Loading…
Reference in new issue