|
@@ -1,6 +1,7 @@
|
|
|
package com.style24.core.biz.thirdparty;
|
|
package com.style24.core.biz.thirdparty;
|
|
|
|
|
|
|
|
import java.util.ArrayList;
|
|
import java.util.ArrayList;
|
|
|
|
|
+import java.util.Collection;
|
|
|
import java.util.List;
|
|
import java.util.List;
|
|
|
|
|
|
|
|
import javax.annotation.PostConstruct;
|
|
import javax.annotation.PostConstruct;
|
|
@@ -13,6 +14,7 @@ import org.springframework.transaction.annotation.Transactional;
|
|
|
|
|
|
|
|
import com.style24.core.biz.dao.NetpathyMailDao;
|
|
import com.style24.core.biz.dao.NetpathyMailDao;
|
|
|
import com.style24.persistence.domain.MailTemplate;
|
|
import com.style24.persistence.domain.MailTemplate;
|
|
|
|
|
+import com.style24.persistence.domain.MailTemplateCorner;
|
|
|
import com.style24.persistence.domain.Netpathy;
|
|
import com.style24.persistence.domain.Netpathy;
|
|
|
|
|
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
@@ -103,8 +105,28 @@ public class NetpathyMailSender {
|
|
|
@Cacheable(value = "mailTemplate", key = "#mailtSq")
|
|
@Cacheable(value = "mailTemplate", key = "#mailtSq")
|
|
|
public MailTemplate getMailTemplate(Integer mailtSq, GagaMap replaceInfo) {
|
|
public MailTemplate getMailTemplate(Integer mailtSq, GagaMap replaceInfo) {
|
|
|
MailTemplate mailTemplate = netpathyDao.getMailTemplate(mailtSq);
|
|
MailTemplate mailTemplate = netpathyDao.getMailTemplate(mailtSq);
|
|
|
|
|
+
|
|
|
mailTemplate.setMailtNm(GagaStringUtil.replace(this.mergeData(mailTemplate.getMailtNm(), replaceInfo), ">", ">"));
|
|
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), ">", ">"));
|
|
|
|
|
+
|
|
|
|
|
+ // 마케팅메일이면
|
|
|
|
|
+ if (mailTemplate.getMailtGb().equals("M")) {
|
|
|
|
|
+ // 메일템플릿코너 목록
|
|
|
|
|
+ Collection<MailTemplateCorner> mtcList = netpathyDao.getMailTemplateCornerList(mailtSq);
|
|
|
|
|
+
|
|
|
|
|
+ if (mtcList != null && !mtcList.isEmpty()) {
|
|
|
|
|
+ for (MailTemplateCorner mtc : mtcList) {
|
|
|
|
|
+ // 메일템플릿코너상품 목록
|
|
|
|
|
+ mtc.setMailtcGoodsList(netpathyDao.getMailTemplateCornerGoodsList(mtc.getMailtcSq()));
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+// replaceInfo.setString("", mtc)
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
mailTemplate.setMailContent(GagaStringUtil.replace(this.mergeData(mailTemplate.getMailContent(), replaceInfo), ">", ">"));
|
|
mailTemplate.setMailContent(GagaStringUtil.replace(this.mergeData(mailTemplate.getMailContent(), replaceInfo), ">", ">"));
|
|
|
|
|
+
|
|
|
return mailTemplate;
|
|
return mailTemplate;
|
|
|
}
|
|
}
|
|
|
|
|
|