|
@@ -1,29 +1,27 @@
|
|
|
-package cn.gygxzc.envir.email.impl;
|
|
|
+package cn.gygxzc.envir.bus.mail.impl;
|
|
|
|
|
|
-import cn.gygxzc.envir.QueueName;
|
|
|
-import cn.gygxzc.envir.email.IEmailSender;
|
|
|
+import cn.gygxzc.envir.bus.QueueName;
|
|
|
+import cn.gygxzc.envir.bus.mail.IMailBusSender;
|
|
|
import cn.gygxzc.envir.core.entity.MailEntity;
|
|
|
import org.springframework.amqp.core.AmqpTemplate;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
/**
|
|
|
- *
|
|
|
* @author tuonina
|
|
|
* @createTime 2019/3/4
|
|
|
*/
|
|
|
@Service
|
|
|
-public class EmailSenderImpl implements IEmailSender {
|
|
|
-
|
|
|
+public class MailBusSenderImpl implements IMailBusSender {
|
|
|
private final AmqpTemplate template;
|
|
|
|
|
|
@Autowired
|
|
|
- public EmailSenderImpl(AmqpTemplate template) {
|
|
|
+ public MailBusSenderImpl(AmqpTemplate template) {
|
|
|
this.template = template;
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
public void sendMail(MailEntity mail) {
|
|
|
- template.convertAndSend(QueueName.EMAIL,mail);
|
|
|
+ template.convertAndSend(QueueName.EMAIL, mail);
|
|
|
}
|
|
|
}
|