add shopify merchant register email, add to sysconfig

master
Yixian 3 years ago
parent e6215ea645
commit 97470e3b78

@ -4,6 +4,7 @@ import au.com.royalpay.payment.manage.notice.core.MailService;
import au.com.royalpay.payment.manage.shopify.store.domain.entity.ShopifyMerchantApplyInfo;
import au.com.royalpay.payment.manage.shopify.store.domain.event.ShopifyStoreCreatedEvent;
import au.com.royalpay.payment.manage.shopify.store.web.command.PaymentMerchantCommand;
import au.com.royalpay.payment.tools.env.SysConfigManager;
import lombok.extern.slf4j.Slf4j;
import org.springframework.context.event.EventListener;
import org.springframework.scheduling.annotation.Async;
@ -24,8 +25,9 @@ public class ShopifyStoreCreatedListener {
@Resource
private SpringTemplateEngine thymeleaf;
@Resource
private SysConfigManager sysConfigManager;
private static final String consignee = "info@royalpay.com.au";
@Async
@EventListener
@ -51,6 +53,7 @@ public class ShopifyStoreCreatedListener {
final String content = thymeleaf.process("mail/shopify_merchant_application.html", ctx);
try {
String consignee = sysConfigManager.getConfig("shopify.email.merchant-register", "info@royalpay.com.au,compliance@royalpay.com.au");
mailService.sendEmail("Shopify merchant application", consignee, "", content);
} catch (URISyntaxException e) {
log.error(e.getMessage());

Loading…
Cancel
Save