|
|
@@ -3,6 +3,7 @@ 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.persistence.domain.CustCoupon;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
@@ -42,6 +43,9 @@ public class TsbCustomerService {
|
|
|
@Autowired
|
|
|
private TscKakaotalkService kakaotalkService;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private TscMailService mailService;
|
|
|
+
|
|
|
/**
|
|
|
* 휴면전환예정 메일 발송 대상
|
|
|
*
|
|
|
@@ -67,27 +71,17 @@ public class TsbCustomerService {
|
|
|
GagaMap result = new GagaMap();
|
|
|
int succCnt = 0;
|
|
|
int failCnt = 0;
|
|
|
+ Integer senderNo = TsbConstants.REG_NO;
|
|
|
for (Customer customer : customerCollection) {
|
|
|
try {
|
|
|
- // TODO: 이메일 발송 모듈 붙어야 함 2021.03.09 jsshin
|
|
|
// 이메일 발송
|
|
|
if (StringUtils.isNotBlank(customer.getEmail())) {
|
|
|
-
|
|
|
+ mailService.sendExpectedDormentCustomer(customer, senderNo);
|
|
|
}
|
|
|
- // TODO: 카카오톡 발송 모듈 붙어야 함 2021.03.09 jsshin
|
|
|
// 카카오톡 알림톡
|
|
|
if (StringUtils.isNotBlank(customer.getCellPhnno())) {
|
|
|
-
|
|
|
+ kakaotalkService.sendExpectedDormentCustomer(customer, senderNo);
|
|
|
}
|
|
|
- CustContactHst custContactHst = new CustContactHst();
|
|
|
- custContactHst.setContactType(TscConstants.ContactType.DORMANT_EXPECTED.value());
|
|
|
- custContactHst.setContactMethod(TscConstants.ContactMethod.KAKAOTALK.value());
|
|
|
- custContactHst.setContactContents("휴면전환예정 안내");
|
|
|
- custContactHst.setSenderNo(TsbConstants.REG_NO);
|
|
|
- custContactHst.setReceiverNo(customer.getCustNo());
|
|
|
- custContactHst.setRegNo(TsbConstants.REG_NO);
|
|
|
- //접촉 이력 저장
|
|
|
- coreCustomerService.createCustomerContactHistory(custContactHst);
|
|
|
|
|
|
succCnt++;
|
|
|
|
|
|
@@ -211,10 +205,9 @@ public class TsbCustomerService {
|
|
|
for (Customer customer : customerCollection) {
|
|
|
try {
|
|
|
Integer senderNo = TsbConstants.REG_NO;
|
|
|
- // TODO: 이메일 발송 모듈 붙어야 함 2021.05.06 jsshin
|
|
|
- // 이메일 발송
|
|
|
- if (StringUtils.isNotBlank(customer.getEmail())) {
|
|
|
|
|
|
+ if (StringUtils.isNotBlank(customer.getEmail())) {
|
|
|
+ mailService.sendPrivacyPolicyNotice(customer, senderNo);
|
|
|
}
|
|
|
|
|
|
if (StringUtils.isNotBlank(customer.getCellPhnno())) {
|
|
|
@@ -260,10 +253,10 @@ public class TsbCustomerService {
|
|
|
for (Customer customer : customerCollection) {
|
|
|
try {
|
|
|
Integer senderNo = TsbConstants.REG_NO;
|
|
|
- // TODO: 이메일 발송 모듈 붙어야 함 2021.05.06 jsshin
|
|
|
+
|
|
|
// 이메일 발송
|
|
|
if (StringUtils.isNotBlank(customer.getEmail())) {
|
|
|
-
|
|
|
+ mailService.sendMarketingAgreeNotice(customer, senderNo);
|
|
|
}
|
|
|
|
|
|
if (StringUtils.isNotBlank(customer.getCellPhnno())) {
|
|
|
@@ -399,11 +392,10 @@ public class TsbCustomerService {
|
|
|
*/
|
|
|
@Transactional("shopTxnManager")
|
|
|
public void sendBirthDayCouponNotice(CustCoupon custCoupon) {
|
|
|
- // TODO: 이메일 발송 모듈 붙어야 함 2021.05.10 jsshin
|
|
|
Integer senderNo = TsbConstants.REG_NO;
|
|
|
// 이메일 발송
|
|
|
if (StringUtils.isNotBlank(custCoupon.getEmail()) && "Y".equals(custCoupon.getEmailAgreeYn())) {
|
|
|
-
|
|
|
+ mailService.sendBirthDayCouponNotice(custCoupon, senderNo);
|
|
|
}
|
|
|
// 카카오 알림톡
|
|
|
if (StringUtils.isNotBlank(custCoupon.getCellPhnno()) && "Y".equals(custCoupon.getSmsAgreeYn())) {
|