Kaynağa Gözat

메일 서비스 추가

jsshin 5 yıl önce
ebeveyn
işleme
01bf091b6c

+ 1 - 2
src/main/java/com/style24/core/biz/service/TscMailService.java

@@ -51,11 +51,10 @@ public class TscMailService {
 	@Transactional("shopTxnManager")
 	public void sendCustomerTempPassword(Customer customer, Integer senderNo) {
 		GagaMap replaceInfo = new GagaMap();
-		replaceInfo.setString("siteNm", siteNm);
 		replaceInfo.setString("custNm", customer.getCustNm());
 		replaceInfo.setString("passwd", customer.getPasswd());
 
-		netpathyMailSender.send(SsgKakaoSender.KakaoAnswerSq.TEMP_PASSWD.value(), customer.getEmail(), replaceInfo);
+		netpathyMailSender.send(NetpathyMailSender.MailAnswerSq.TEMP_PASSWD.value(), customer.getEmail(), replaceInfo);
 
 		try {
 			// 고객접촉이력 정보

+ 12 - 10
src/main/java/com/style24/core/biz/thirdparty/NetpathyMailSender.java

@@ -5,6 +5,7 @@ import java.util.List;
 
 import javax.annotation.PostConstruct;
 
+import com.style24.core.support.env.TscConstants;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.cache.annotation.Cacheable;
 import org.springframework.core.env.Environment;
@@ -31,10 +32,10 @@ import com.gagaframework.web.util.GagaStringUtil;
 @Slf4j
 public class NetpathyMailSender {
 
-//	// 발신자전화번호
-//	private String callbackTelNo;
-//
-//	private String domainUrl;
+	// 발신자전화번호
+	private String callbackTelNo;
+
+	private String domainUrl;
 
 	@Autowired
 	private Environment env;
@@ -82,13 +83,13 @@ public class NetpathyMailSender {
 
 	@PostConstruct
 	public void init() {
-//		domainUrl = env.getProperty("domain.front");
-//		callbackTelNo = TscConstants.CALLCENTER_TEL_NO;
+		domainUrl = env.getProperty("domain.front");
+		callbackTelNo = TscConstants.CALLCENTER_TEL_NO;
 
-//		log.debug("\n\n---- NetpathyMailSender initialization started ----");
-//		log.debug("domainUrl: [{}]", domainUrl);
-//		log.debug("callbackTelNo: [{}]", callbackTelNo);
-//		log.debug("\n--- NetpathyMailSender initialization completed ----\n");
+		log.debug("\n\n---- NetpathyMailSender initialization started ----");
+		log.debug("domainUrl: [{}]", domainUrl);
+		log.debug("callbackTelNo: [{}]", callbackTelNo);
+		log.debug("\n--- NetpathyMailSender initialization completed ----\n");
 	}
 
 	/**
@@ -146,6 +147,7 @@ public class NetpathyMailSender {
 		mailTemplate.setMailtNm(GagaStringUtil.replace(this.mergeData(mailTemplate.getMailtNm(), replaceInfo), ">", ">"));
 		mailTemplate.setMailhContent(GagaStringUtil.replace(this.mergeData(mailTemplate.getMailhContent(), replaceInfo), ">", ">"));
 		mailTemplate.setMailfContent(GagaStringUtil.replace(this.mergeData(mailTemplate.getMailfContent(), replaceInfo), ">", ">"));
+		mailTemplate.setMailContent(GagaStringUtil.replace(this.mergeData(mailTemplate.getMailContent(), replaceInfo), ">", ">"));
 
 		return mailTemplate;
 	}

+ 1 - 0
src/main/java/com/style24/persistence/mybatis/shop/TscMailTemplate.xml

@@ -71,6 +71,7 @@
 		     , B.MAILHF_CONTENT AS MAILH_CONTENT /*헤더내용*/
 		     , C.MAILHF_CONTENT AS MAILF_CONTENT /*푸터내용*/
 		     , A.MAIL_CONTENT                    /*메일내용*/
+             , A.MAILT_NM
 		FROM   TB_MAILT A
 		     , TB_MAILHF B
 		     , TB_MAILHF C