From 97470e3b784c7135b9fb4db3ec566dfdaf4eec04 Mon Sep 17 00:00:00 2001 From: Yixian Date: Fri, 13 May 2022 16:46:34 +0800 Subject: [PATCH] add shopify merchant register email, add to sysconfig --- .../store/domain/listener/ShopifyStoreCreatedListener.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main/java/au/com/royalpay/payment/manage/shopify/store/domain/listener/ShopifyStoreCreatedListener.java b/src/main/java/au/com/royalpay/payment/manage/shopify/store/domain/listener/ShopifyStoreCreatedListener.java index 2e978cbc0..0a089972a 100644 --- a/src/main/java/au/com/royalpay/payment/manage/shopify/store/domain/listener/ShopifyStoreCreatedListener.java +++ b/src/main/java/au/com/royalpay/payment/manage/shopify/store/domain/listener/ShopifyStoreCreatedListener.java @@ -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());