|
|
@@ -2,15 +2,6 @@ package com.style24.batch.biz.service;
|
|
|
|
|
|
import java.util.Collection;
|
|
|
|
|
|
-import com.style24.core.biz.service.TscKakaotalkService;
|
|
|
-import com.style24.core.biz.service.TscMailService;
|
|
|
-import com.style24.core.biz.thirdparty.NetpathyMailSender;
|
|
|
-import com.style24.core.biz.thirdparty.SsgKakaoSender;
|
|
|
-import com.style24.core.support.env.TscConstants;
|
|
|
-import com.style24.persistence.domain.CustContactHst;
|
|
|
-import com.style24.persistence.domain.CustCoupon;
|
|
|
-import com.style24.persistence.domain.Netpathy;
|
|
|
-import com.style24.persistence.domain.SsgDirectMessage;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.core.env.Environment;
|
|
|
@@ -20,12 +11,19 @@ import org.springframework.transaction.annotation.Transactional;
|
|
|
import com.style24.batch.biz.dao.TsbCustomerDao;
|
|
|
import com.style24.batch.support.env.TsbConstants;
|
|
|
import com.style24.core.biz.service.TscCustomerService;
|
|
|
-
|
|
|
+import com.style24.core.biz.service.TscKakaotalkService;
|
|
|
+import com.style24.core.biz.service.TscMailService;
|
|
|
+import com.style24.core.biz.thirdparty.NetpathyMailSender;
|
|
|
+import com.style24.core.biz.thirdparty.SsgKakaoSender;
|
|
|
+import com.style24.core.support.env.TscConstants;
|
|
|
import com.style24.core.support.util.CryptoUtils;
|
|
|
-
|
|
|
+import com.style24.persistence.domain.CustContactHst;
|
|
|
+import com.style24.persistence.domain.CustCoupon;
|
|
|
import com.style24.persistence.domain.CustGrade;
|
|
|
import com.style24.persistence.domain.Customer;
|
|
|
import com.style24.persistence.domain.CustomerSearch;
|
|
|
+import com.style24.persistence.domain.Netpathy;
|
|
|
+import com.style24.persistence.domain.SsgDirectMessage;
|
|
|
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
|
|
|
@@ -62,7 +60,6 @@ public class TsbCustomerService {
|
|
|
@Autowired
|
|
|
private Environment env;
|
|
|
|
|
|
-
|
|
|
/**
|
|
|
* 휴면전환예정 메일 발송 대상
|
|
|
*
|
|
|
@@ -269,7 +266,7 @@ public class TsbCustomerService {
|
|
|
replaceInfo.setString("siteNm", siteNm);
|
|
|
int result;
|
|
|
SsgDirectMessage directMessage = kakaoSender.getDiretMessage(SsgKakaoSender.KakaoAnswerSq.PRIVACY_POLICY.value(), dm, replaceInfo);
|
|
|
- if ("style".equals(active) ||"real".equals(active) ||"locp".equals(active) ||"brdg".equals(active)) {
|
|
|
+ if ("style".equals(active) || "real".equals(active) || "locp".equals(active) || "brdg".equals(active)) {
|
|
|
result = customerDao.createPrivacyPolicyNoticeKko(directMessage);
|
|
|
} else {
|
|
|
result = customerDao.createPrivacyPolicyNoticeKkoDev(directMessage);
|
|
|
@@ -306,7 +303,7 @@ public class TsbCustomerService {
|
|
|
int result;
|
|
|
Netpathy netpathy = netpathyMailSender.getMailContents(NetpathyMailSender.MailAnswerSq.PRIVACY_POLICY.value(), replaceInfo);
|
|
|
|
|
|
- if ("style".equals(active) ||"real".equals(active) || "locp".equals(active) ||"brdg".equals(active)) {
|
|
|
+ if ("style".equals(active) || "real".equals(active) || "locp".equals(active) || "brdg".equals(active)) {
|
|
|
result = customerDao.createPrivacyPolicyNoticeEmail(netpathy);
|
|
|
} else {
|
|
|
result = customerDao.createPrivacyPolicyNoticeEmailDev(netpathy);
|
|
|
@@ -478,11 +475,16 @@ public class TsbCustomerService {
|
|
|
*/
|
|
|
@Transactional("shopTxnManager")
|
|
|
public void createNetpathyMailCustomer() {
|
|
|
- // 회원정보 Truncate
|
|
|
- customerDao.truncateNetpathyMailCustomer();
|
|
|
+ int result = 0;
|
|
|
|
|
|
- // 회원정보 생성
|
|
|
- int result = customerDao.createNetpathyMailCustomer();
|
|
|
+ String active = env.getProperty("spring.profiles.active");
|
|
|
+ if ("style".equals(active) || "brdg".equals(active)) {
|
|
|
+ customerDao.truncateNetpathyMailCustomer();
|
|
|
+ result = customerDao.createNetpathyMailCustomer();
|
|
|
+ } else {
|
|
|
+ customerDao.truncateNetpathyMailCustomerDev();
|
|
|
+ result = customerDao.createNetpathyMailCustomerDev();
|
|
|
+ }
|
|
|
|
|
|
log.info("1.넷퍼시메일솔루션으로 회원정보 생성 ({}건) : OK", result);
|
|
|
}
|
|
|
@@ -494,11 +496,16 @@ public class TsbCustomerService {
|
|
|
*/
|
|
|
@Transactional("shopTxnManager")
|
|
|
public void createNetpathyMailWithdrawalCustomer() {
|
|
|
- // 회원정보 Truncate
|
|
|
- customerDao.truncateNetpathyMailWithdrawalCustomer();
|
|
|
+ int result = 0;
|
|
|
|
|
|
- // 회원정보 생성
|
|
|
- int result = customerDao.createNetpathyMailWithdrawalCustomer();
|
|
|
+ String active = env.getProperty("spring.profiles.active");
|
|
|
+ if ("style".equals(active) || "brdg".equals(active)) {
|
|
|
+ customerDao.truncateNetpathyMailWithdrawalCustomer();
|
|
|
+ result = customerDao.createNetpathyMailWithdrawalCustomer();
|
|
|
+ } else {
|
|
|
+ customerDao.truncateNetpathyMailWithdrawalCustomerDev();
|
|
|
+ result = customerDao.createNetpathyMailWithdrawalCustomerDev();
|
|
|
+ }
|
|
|
|
|
|
log.info("2.넷퍼시메일솔루션으로 탈퇴/휴면회원정보 생성 ({}건) : OK", result);
|
|
|
}
|
|
|
@@ -511,11 +518,16 @@ public class TsbCustomerService {
|
|
|
*/
|
|
|
@Transactional("shopTxnManager")
|
|
|
public void createNetpathyMailCustomerPoint() {
|
|
|
- // 회원정보 Truncate
|
|
|
- customerDao.truncateNetpathyMailCustomerPoint();
|
|
|
+ int result = 0;
|
|
|
|
|
|
- // 회원정보 생성
|
|
|
- int result = customerDao.createNetpathyMailCustomerPoint();
|
|
|
+ String active = env.getProperty("spring.profiles.active");
|
|
|
+ if ("style".equals(active) || "brdg".equals(active)) {
|
|
|
+ customerDao.truncateNetpathyMailCustomerPoint();
|
|
|
+ result = customerDao.createNetpathyMailCustomerPoint();
|
|
|
+ } else {
|
|
|
+ customerDao.truncateNetpathyMailCustomerPointDev();
|
|
|
+ result = customerDao.createNetpathyMailCustomerPointDev();
|
|
|
+ }
|
|
|
|
|
|
log.info("3.넷퍼시메일솔루션으로 회원포인트정보 생성 ({}건) : OK", result);
|
|
|
}
|
|
|
@@ -544,7 +556,6 @@ public class TsbCustomerService {
|
|
|
return customerDao.getBirthDayTargetList(customerSearch);
|
|
|
}
|
|
|
|
|
|
-
|
|
|
/**
|
|
|
* 생일쿠폰 안내
|
|
|
*
|
|
|
@@ -559,7 +570,7 @@ public class TsbCustomerService {
|
|
|
int succCnt = 0;
|
|
|
int failCnt = 0;
|
|
|
Integer senderNo = TsbConstants.REG_NO;
|
|
|
- for (CustCoupon custCoupon: couponCollection) {
|
|
|
+ for (CustCoupon custCoupon : couponCollection) {
|
|
|
try {
|
|
|
custCoupon.setRegNo(senderNo);
|
|
|
custCoupon.setUpdNo(senderNo);
|