|
|
@@ -38,22 +38,25 @@ public class TsbCustomerService {
|
|
|
|
|
|
/**
|
|
|
* 휴면전환예정 메일 발송 대상
|
|
|
- * @param customerSearch - 전환예정기간
|
|
|
+ *
|
|
|
+ * @param customerSearch - 전환예정기간
|
|
|
* @return Collection<Customer>
|
|
|
* @author jsshin
|
|
|
- * @since 2021. 03. 05
|
|
|
+ * @since 2021. 03. 05
|
|
|
*/
|
|
|
public Collection<Customer> getDormantCustomerScheduleList(CustomerSearch customerSearch) {
|
|
|
return customerDao.getDormantCustomerScheduleList(customerSearch);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * 휴면전환예정 메일 발송 대상
|
|
|
- * @param customerCollection - 대상
|
|
|
+ * 휴면전환예정 안내 메일 발송 대상
|
|
|
+ *
|
|
|
+ * @param customerCollection - 대상
|
|
|
* @return int - 성공여부
|
|
|
* @author jsshin
|
|
|
- * @since 2021. 03. 08
|
|
|
+ * @since 2021. 03. 08
|
|
|
*/
|
|
|
+ @Transactional("shopTxnManager")
|
|
|
public GagaMap sendDormantCustomerSchedule(Collection<Customer> customerCollection) {
|
|
|
GagaMap result = new GagaMap();
|
|
|
int succCnt = 0;
|
|
|
@@ -73,6 +76,7 @@ public class TsbCustomerService {
|
|
|
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);
|
|
|
@@ -94,21 +98,23 @@ public class TsbCustomerService {
|
|
|
|
|
|
/**
|
|
|
* 휴면회원 전환대상
|
|
|
- * @param customerSearch - 전환기간
|
|
|
+ *
|
|
|
+ * @param customerSearch - 전환기간
|
|
|
* @return Collection<Customer>
|
|
|
* @author jsshin
|
|
|
- * @since 2021. 03. 05
|
|
|
+ * @since 2021. 03. 05
|
|
|
*/
|
|
|
- public Collection<Customer> getDormentCustomerList(CustomerSearch customerSearch){
|
|
|
+ public Collection<Customer> getDormentCustomerList(CustomerSearch customerSearch) {
|
|
|
return customerDao.getDormentCustomerList(customerSearch);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 휴면회원 전환 처리
|
|
|
- * @param customerSearch - 전환기간
|
|
|
+ *
|
|
|
+ * @param customerSearch - 전환기간
|
|
|
* @return GagaMap - 결과
|
|
|
* @author jsshin
|
|
|
- * @since 2021. 03. 05
|
|
|
+ * @since 2021. 03. 05
|
|
|
*/
|
|
|
@Transactional("shopTxnManager")
|
|
|
public GagaMap saveDormantCustomer(CustomerSearch customerSearch) {
|
|
|
@@ -130,22 +136,24 @@ public class TsbCustomerService {
|
|
|
|
|
|
/**
|
|
|
* 탈퇴회원 삭제대상 목록
|
|
|
- * @param customerSearch - 전환기간
|
|
|
+ *
|
|
|
+ * @param customerSearch - 전환기간
|
|
|
* @return Collection<Customer>
|
|
|
* @author jsshin
|
|
|
- * @since 2021. 03. 08
|
|
|
+ * @since 2021. 03. 08
|
|
|
*/
|
|
|
- public Collection<Customer> getExpireSecedeCustomerList(CustomerSearch customerSearch){
|
|
|
+ public Collection<Customer> getExpireSecedeCustomerList(CustomerSearch customerSearch) {
|
|
|
|
|
|
return customerDao.getExpireSecedeCustomerList(customerSearch);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 탈퇴처리
|
|
|
- * @param customerCollection - 삭제대상 목록
|
|
|
+ *
|
|
|
+ * @param customerCollection - 삭제대상 목록
|
|
|
* @return GagaMap - 결과정보
|
|
|
* @author jsshin
|
|
|
- * @since 2021. 03. 08
|
|
|
+ * @since 2021. 03. 08
|
|
|
*/
|
|
|
@Transactional("shopTxnManager")
|
|
|
public GagaMap saveSecedeCustomer(Collection<Customer> customerCollection) {
|
|
|
@@ -170,5 +178,110 @@ public class TsbCustomerService {
|
|
|
return result;
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 개인정보 이용내역 안내 대상목록
|
|
|
+ *
|
|
|
+ * @return Collection<Customer>
|
|
|
+ * @author jsshin
|
|
|
+ * @since 2021. 05. 06
|
|
|
+ */
|
|
|
+ public Collection<Customer> getPrivacyPolicyNoticeTargetList(CustomerSearch customerSearch) {
|
|
|
+ return customerDao.getPrivacyPolicyNoticeTargetList(customerSearch);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 개인정보 이용내역 안내 발송
|
|
|
+ *
|
|
|
+ * @param customerCollection - 대상
|
|
|
+ * @return GagaMap - 성공/실패 카운트
|
|
|
+ * @author jsshin
|
|
|
+ * @since 2021. 05. 06
|
|
|
+ */
|
|
|
+ @Transactional("shopTxnManager")
|
|
|
+ public GagaMap sendPrivacyPolicyNotice(Collection<Customer> customerCollection) {
|
|
|
+ GagaMap result = new GagaMap();
|
|
|
+ int succCnt = 0;
|
|
|
+ int failCnt = 0;
|
|
|
+ for (Customer customer : customerCollection) {
|
|
|
+ try {
|
|
|
+ // TODO: 이메일 발송 모듈 붙어야 함 2021.05.06 jsshin
|
|
|
+ // 이메일 발송
|
|
|
+ if (StringUtils.isNotBlank(customer.getEmail())) {
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ CustContactHst custContactHst = new CustContactHst();
|
|
|
+ custContactHst.setContactType(TscConstants.ContactType.PRIVACY_POLICY.value());
|
|
|
+ custContactHst.setContactMethod(TscConstants.ContactMethod.EMAIL.value());
|
|
|
+ custContactHst.setContactContents("개인정보 이용내역 안내 발송");
|
|
|
+ custContactHst.setSenderNo(TsbConstants.REG_NO);
|
|
|
+ custContactHst.setReceiverNo(customer.getCustNo());
|
|
|
+ custContactHst.setRegNo(TsbConstants.REG_NO);
|
|
|
+ //접촉 이력 저장
|
|
|
+ coreCustomerService.createCustomerContactHistory(custContactHst);
|
|
|
+
|
|
|
+ succCnt++;
|
|
|
+
|
|
|
+ } catch (Exception e) {
|
|
|
+ log.error(e.getMessage());
|
|
|
+ failCnt++;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ result.setInt("succCnt", succCnt);
|
|
|
+ result.setInt("failCnt", failCnt);
|
|
|
+ return result;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 마케팅 정보 수신동의 내역 안내 대상목록
|
|
|
+ *
|
|
|
+ * @return Collection<Customer>
|
|
|
+ * @author jsshin
|
|
|
+ * @since 2021. 05. 06
|
|
|
+ */
|
|
|
+ public Collection<Customer> getMarketingAgreeNoticeTargetList(CustomerSearch customerSearch) {
|
|
|
+ return customerDao.getMarketingAgreeNoticeTargetList(customerSearch);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 마케팅 정보 수신동의 내역 안내 발송
|
|
|
+ *
|
|
|
+ * @param customerCollection - 대상
|
|
|
+ * @return GagaMap - 성공/실패 카운트
|
|
|
+ * @author jsshin
|
|
|
+ * @since 2021. 05. 06
|
|
|
+ */
|
|
|
+ @Transactional("shopTxnManager")
|
|
|
+ public GagaMap sendMarketingAgreeNotice(Collection<Customer> customerCollection) {
|
|
|
+ GagaMap result = new GagaMap();
|
|
|
+ int succCnt = 0;
|
|
|
+ int failCnt = 0;
|
|
|
+ for (Customer customer : customerCollection) {
|
|
|
+ try {
|
|
|
+ // TODO: 이메일 발송 모듈 붙어야 함 2021.05.06 jsshin
|
|
|
+ // 이메일 발송
|
|
|
+ if (StringUtils.isNotBlank(customer.getEmail())) {
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ CustContactHst custContactHst = new CustContactHst();
|
|
|
+ custContactHst.setContactType(TscConstants.ContactType.MARKETING_AGREE.value());
|
|
|
+ custContactHst.setContactMethod(TscConstants.ContactMethod.EMAIL.value());
|
|
|
+ custContactHst.setContactContents("마케팅 정보 수신동의 내역 안내");
|
|
|
+ custContactHst.setSenderNo(TsbConstants.REG_NO);
|
|
|
+ custContactHst.setReceiverNo(customer.getCustNo());
|
|
|
+ custContactHst.setRegNo(TsbConstants.REG_NO);
|
|
|
+ //접촉 이력 저장
|
|
|
+ coreCustomerService.createCustomerContactHistory(custContactHst);
|
|
|
|
|
|
+ succCnt++;
|
|
|
+
|
|
|
+ } catch (Exception e) {
|
|
|
+ failCnt++;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ result.setInt("succCnt", succCnt);
|
|
|
+ result.setInt("failCnt", failCnt);
|
|
|
+ return result;
|
|
|
+ }
|
|
|
}
|