|
|
@@ -136,29 +136,236 @@ public class TscKakaotalkService {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 생일축하 안내 알림톡
|
|
|
+ *
|
|
|
+ * @param custCoupon - 고객 정보, 쿠폰 정보
|
|
|
+ * @param senderNo - 발송자번호(userNo, custNo)
|
|
|
+ * @author jsshin
|
|
|
+ * @since 2021. 05. 31
|
|
|
+ */
|
|
|
+ @Transactional("shopTxnManager")
|
|
|
+ public void sendBirthDayCouponNotice(CustCoupon custCoupon, Integer senderNo) {
|
|
|
+ SsgDirectMessage dm = new SsgDirectMessage();
|
|
|
+ dm.setFuserid(String.valueOf(senderNo)); // 발송자NO
|
|
|
+ dm.setFdestine(custCoupon.getCellPhnno());
|
|
|
+ dm.setFkkoresendtype("LMS");
|
|
|
+
|
|
|
+
|
|
|
+ GagaMap replaceInfo = new GagaMap();
|
|
|
+ replaceInfo.setString("siteNm", siteNm);
|
|
|
+ replaceInfo.setString("custNm", custCoupon.getCustNm());
|
|
|
+ replaceInfo.setInt("dcVal", custCoupon.getDcVal());
|
|
|
+ replaceInfo.setString("dcWay", custCoupon.getDcWay());
|
|
|
+
|
|
|
+ replaceInfo.set("custNo", custCoupon.getCustNo());
|
|
|
+ kakaoSender.send(SsgKakaoSender.KakaoAnswerSq.BIRTH_COUPON_NOTICE.value(), dm, replaceInfo);
|
|
|
+
|
|
|
+ try {
|
|
|
+ // 고객접촉이력 정보
|
|
|
+ CustContactHst custContactHst = new CustContactHst();
|
|
|
+ custContactHst.setContactType(TscConstants.ContactType.BIRTH_COUPON_NOTICE.value()); // 접촉유형:임시비밀번호발급(공통코드G054)
|
|
|
+ custContactHst.setContactMethod(TscConstants.ContactMethod.KAKAOTALK.value()); // 접촉방법:알림톡+문자(공통코드G055)
|
|
|
+ custContactHst.setContactContents("생일축하안내");
|
|
|
+ custContactHst.setReceiverNo(custCoupon.getCustNo());
|
|
|
+ custContactHst.setSenderNo(senderNo);
|
|
|
+ custContactHst.setRegNo(senderNo);
|
|
|
+ coreCustomerService.createCustomerContactHistory(custContactHst);
|
|
|
+ } catch (Exception e) {
|
|
|
+ log.error("error", e);
|
|
|
+ // Do nothing
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 기본 LMS 발송
|
|
|
+ *
|
|
|
+ * @param customer - LMS 정보
|
|
|
+ * @author jsshin
|
|
|
+ * @since 2021. 01. 21
|
|
|
+ */
|
|
|
+ @Transactional("shopTxnManager")
|
|
|
+ public void sendCustomerBasicLms(Customer customer, Integer senderNo) {
|
|
|
+ SsgDirectMessage dm = new SsgDirectMessage();
|
|
|
+ dm.setFuserid(String.valueOf(senderNo)); // 발송자NO
|
|
|
+ dm.setFdestine(customer.getCellPhnno());
|
|
|
+
|
|
|
+ GagaMap replaceInfo = new GagaMap();
|
|
|
+ replaceInfo.setString("siteNm", siteNm);
|
|
|
+ replaceInfo.setString("custNm", customer.getCustNm());
|
|
|
+ replaceInfo.setString("content", customer.getContent());
|
|
|
+ replaceInfo.setString("callcenterTelNo", TscConstants.CALLCENTER_TEL_NO);
|
|
|
+ kakaoSender.sendLms(SsgKakaoSender.KakaoAnswerSq.BASIC_LMS.value(), dm, replaceInfo);
|
|
|
+
|
|
|
+ try {
|
|
|
+ // 고객접촉이력 정보
|
|
|
+ CustContactHst custContactHst = new CustContactHst();
|
|
|
+ custContactHst.setContactType(TscConstants.ContactType.BASIC_LMS.value()); // 접촉유형:회원-기본LMS안내발송
|
|
|
+ custContactHst.setContactMethod(TscConstants.ContactMethod.LMS.value()); // 접촉방법:LMS(공통코드G055)
|
|
|
+ custContactHst.setContactContents("기본LMS안내발송");
|
|
|
+ custContactHst.setReceiverNo(customer.getCustNo());
|
|
|
+ custContactHst.setSenderNo(senderNo);
|
|
|
+ custContactHst.setRegNo(senderNo);
|
|
|
+ custContactHst.setUpdNo(senderNo);
|
|
|
+ coreCustomerService.createCustomerContactHistory(custContactHst);
|
|
|
+ } catch (Exception e) {
|
|
|
+ log.error("error", e);
|
|
|
+ // Do nothing
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
/**
|
|
|
* 인증번호발송
|
|
|
- * @param customer - 고객 정보
|
|
|
- * @param senderNo - 발송자번호(고객, 사용자)
|
|
|
+ *
|
|
|
+ * @param customer - 인증번호 발송
|
|
|
* @author jsshin
|
|
|
- * @since 2020. 4. 8
|
|
|
+ * @since 2021. 01. 25
|
|
|
*/
|
|
|
- public void sendCustomerCertNo(Customer customer, Integer senderNo) throws Exception {
|
|
|
+ @Transactional("shopTxnManager")
|
|
|
+ public void sendCustomerCertNo(Customer customer, Integer senderNo) {
|
|
|
SsgDirectMessage dm = new SsgDirectMessage();
|
|
|
dm.setFuserid(String.valueOf(senderNo)); // 발송자NO
|
|
|
dm.setFdestine(customer.getCellPhnno());
|
|
|
-// dm.setFkkoresendtype("LMS");
|
|
|
+ dm.setFkkoresendtype("LMS");
|
|
|
|
|
|
GagaMap replaceInfo = new GagaMap();
|
|
|
replaceInfo.setString("siteNm", siteNm);
|
|
|
replaceInfo.setString("custNm", customer.getCustNm());
|
|
|
replaceInfo.setString("certNo", customer.getCertNo());
|
|
|
|
|
|
- // SMS로 발송
|
|
|
- kakaoSender.sendSms(SsgKakaoSender.KakaoAnswerSq.CERT_NO_SEND.value(), dm, replaceInfo);
|
|
|
+ kakaoSender.send(SsgKakaoSender.KakaoAnswerSq.CERT_NO_SEND.value(), dm, replaceInfo);
|
|
|
+
|
|
|
+ try {
|
|
|
+ // 고객접촉이력 정보
|
|
|
+ CustContactHst custContactHst = new CustContactHst();
|
|
|
+ custContactHst.setContactType(TscConstants.ContactType.CERT_NO_SEND.value()); // 접촉유형:회원-휴대전화인증(공통코드G054)
|
|
|
+ custContactHst.setContactMethod(TscConstants.ContactMethod.KAKAOTALK.value()); // 접촉방법:알림톡+문자(공통코드G055)
|
|
|
+ custContactHst.setContactContents("인증번호");
|
|
|
+ custContactHst.setReceiverNo(customer.getCustNo());
|
|
|
+ custContactHst.setSenderNo(senderNo);
|
|
|
+ custContactHst.setRegNo(senderNo);
|
|
|
+ custContactHst.setUpdNo(senderNo);
|
|
|
+ coreCustomerService.createCustomerContactHistory(custContactHst);
|
|
|
+ } catch (Exception e) {
|
|
|
+ log.error("error", e);
|
|
|
+ // Do nothing
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 이달의 등급 안내 알림톡
|
|
|
+ *
|
|
|
+ * @param customer - 고객 정보
|
|
|
+ * @param senderNo - 발송자번호(userNo, custNo)
|
|
|
+ * @author jsshin
|
|
|
+ * @since 2021. 05. 31
|
|
|
+ */
|
|
|
+ @Transactional("shopTxnManager")
|
|
|
+ public void sendGradeNotice(Customer customer, Integer senderNo) {
|
|
|
+ SsgDirectMessage dm = new SsgDirectMessage();
|
|
|
+ dm.setFuserid(String.valueOf(senderNo)); // 발송자NO
|
|
|
+ dm.setFdestine(customer.getCellPhnno());
|
|
|
+ dm.setFkkoresendtype("LMS");
|
|
|
+
|
|
|
+
|
|
|
+ GagaMap replaceInfo = new GagaMap();
|
|
|
+ replaceInfo.setString("siteNm", siteNm);
|
|
|
+ replaceInfo.setString("custNm", customer.getCustNm());
|
|
|
+ replaceInfo.setString("mm", customer.getMm());
|
|
|
+ replaceInfo.setString("custGradeNm", customer.getCustGradeNm());
|
|
|
+
|
|
|
+ replaceInfo.set("custNo", customer.getCustNo());
|
|
|
+ kakaoSender.send(SsgKakaoSender.KakaoAnswerSq.GRADE_NOTICE.value(), dm, replaceInfo);
|
|
|
+
|
|
|
+ try {
|
|
|
+ // 고객접촉이력 정보
|
|
|
+ CustContactHst custContactHst = new CustContactHst();
|
|
|
+ custContactHst.setContactType(TscConstants.ContactType.GRADE_NOTICE.value()); // 접촉유형:임시비밀번호발급(공통코드G054)
|
|
|
+ custContactHst.setContactMethod(TscConstants.ContactMethod.KAKAOTALK.value()); // 접촉방법:알림톡+문자(공통코드G055)
|
|
|
+ custContactHst.setContactContents("이달의등급혜택안내");
|
|
|
+ custContactHst.setReceiverNo(customer.getCustNo());
|
|
|
+ custContactHst.setSenderNo(senderNo);
|
|
|
+ custContactHst.setRegNo(senderNo);
|
|
|
+ coreCustomerService.createCustomerContactHistory(custContactHst);
|
|
|
+ } catch (Exception e) {
|
|
|
+ log.error("error", e);
|
|
|
+ // Do nothing
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 개인정보 이용내역 안내
|
|
|
+ *
|
|
|
+ * @param customer - 인증번호 발송
|
|
|
+ * @author jsshin
|
|
|
+ * @since 2021. 05. 31
|
|
|
+ */
|
|
|
+ @Transactional("shopTxnManager")
|
|
|
+ public void sendPrivacyPolicyNotice(Customer customer, Integer senderNo) {
|
|
|
+ SsgDirectMessage dm = new SsgDirectMessage();
|
|
|
+ dm.setFuserid(String.valueOf(senderNo)); // 발송자NO
|
|
|
+ dm.setFdestine(customer.getCellPhnno());
|
|
|
+ dm.setFkkoresendtype("LMS");
|
|
|
+
|
|
|
+ GagaMap replaceInfo = new GagaMap();
|
|
|
+ replaceInfo.setString("siteNm", siteNm);
|
|
|
+
|
|
|
+ kakaoSender.send(SsgKakaoSender.KakaoAnswerSq.PRIVACY_POLICY.value(), dm, replaceInfo);
|
|
|
+
|
|
|
+ try {
|
|
|
+ // 고객접촉이력 정보
|
|
|
+ CustContactHst custContactHst = new CustContactHst();
|
|
|
+ custContactHst.setContactType(TscConstants.ContactType.PRIVACY_POLICY.value()); // 접촉유형:회원-휴대전화인증(공통코드G054)
|
|
|
+ custContactHst.setContactMethod(TscConstants.ContactMethod.KAKAOTALK.value()); // 접촉방법:알림톡+문자(공통코드G055)
|
|
|
+ custContactHst.setContactContents("개인정보 이용내역");
|
|
|
+ custContactHst.setReceiverNo(customer.getCustNo());
|
|
|
+ custContactHst.setSenderNo(senderNo);
|
|
|
+ custContactHst.setRegNo(senderNo);
|
|
|
+ custContactHst.setUpdNo(senderNo);
|
|
|
+ coreCustomerService.createCustomerContactHistory(custContactHst);
|
|
|
+ } catch (Exception e) {
|
|
|
+ log.error("error", e);
|
|
|
+ // Do nothing
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 마케팅 수신동의내역 안내
|
|
|
+ *
|
|
|
+ * @param customer - 인증번호 발송
|
|
|
+ * @author jsshin
|
|
|
+ * @since 2021. 05. 31
|
|
|
+ */
|
|
|
+ @Transactional("shopTxnManager")
|
|
|
+ public void sendMarketingAgreeNotice(Customer customer, Integer senderNo) {
|
|
|
+ SsgDirectMessage dm = new SsgDirectMessage();
|
|
|
+ dm.setFuserid(String.valueOf(senderNo)); // 발송자NO
|
|
|
+ dm.setFdestine(customer.getCellPhnno());
|
|
|
+ dm.setFkkoresendtype("LMS");
|
|
|
+
|
|
|
+ GagaMap replaceInfo = new GagaMap();
|
|
|
+ replaceInfo.setString("siteNm", siteNm);
|
|
|
+
|
|
|
+ kakaoSender.send(SsgKakaoSender.KakaoAnswerSq.MARKETING_AGREE.value(), dm, replaceInfo);
|
|
|
+
|
|
|
+ try {
|
|
|
+ // 고객접촉이력 정보
|
|
|
+ CustContactHst custContactHst = new CustContactHst();
|
|
|
+ custContactHst.setContactType(TscConstants.ContactType.MARKETING_AGREE.value()); // 접촉유형:회원-휴대전화인증(공통코드G054)
|
|
|
+ custContactHst.setContactMethod(TscConstants.ContactMethod.KAKAOTALK.value()); // 접촉방법:알림톡+문자(공통코드G055)
|
|
|
+ custContactHst.setContactContents("마케팅수신동의내역");
|
|
|
+ custContactHst.setReceiverNo(customer.getCustNo());
|
|
|
+ custContactHst.setSenderNo(senderNo);
|
|
|
+ custContactHst.setRegNo(senderNo);
|
|
|
+ custContactHst.setUpdNo(senderNo);
|
|
|
+ coreCustomerService.createCustomerContactHistory(custContactHst);
|
|
|
+ } catch (Exception e) {
|
|
|
+ log.error("error", e);
|
|
|
+ // Do nothing
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
/**
|
|
|
* 상품권 기간만료 알림톡(30일)
|
|
|
* @param giftcard - 상품권 정보
|
|
|
@@ -233,7 +440,43 @@ public class TscKakaotalkService {
|
|
|
log.error("error", e);
|
|
|
// Do nothing
|
|
|
}
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 쿠폰 기간만료 알림톡(30일)
|
|
|
+ * @param coupon - 상품권 정보
|
|
|
+ * @param senderNo - 발송자번호(고객번호)
|
|
|
+ * @author sowon
|
|
|
+ * @since 2021. 5. 31
|
|
|
+ */
|
|
|
+ @Transactional("shopTxnManager")
|
|
|
+ public void sendCouponExpectNotify(Coupon coupon, Integer senderNo) {
|
|
|
+ SsgDirectMessage dm = new SsgDirectMessage();
|
|
|
+ dm.setFuserid(String.valueOf(senderNo)); // 발송자NO
|
|
|
+ dm.setFdestine(coupon.getCellPhnno());
|
|
|
+ dm.setFkkoresendtype("LMS");
|
|
|
|
|
|
+ GagaMap replaceInfo = new GagaMap();
|
|
|
+ replaceInfo.setString("siteNm", siteNm);
|
|
|
+ replaceInfo.setString("custNm", coupon.getCustNm());
|
|
|
+ replaceInfo.setString("cpnNm", coupon.getCpnNm());
|
|
|
+ replaceInfo.setString("expBeDt", coupon.getAvailEddt());
|
|
|
+ kakaoSender.send(SsgKakaoSender.KakaoAnswerSq.COUPON_EXTNC_EXPECT.value(), dm, replaceInfo);
|
|
|
+
|
|
|
+ try {
|
|
|
+ // 고객접촉이력 정보
|
|
|
+ CustContactHst custContactHst = new CustContactHst();
|
|
|
+ custContactHst.setContactType(TscConstants.ContactType.COUPON_EXTNC_EXPECT.value()); // 접촉유형:임시비밀번호발급(공통코드G054)
|
|
|
+ custContactHst.setContactMethod(TscConstants.ContactMethod.KAKAOTALK.value()); // 접촉방법:알림톡+문자(공통코드G055)
|
|
|
+ custContactHst.setContactContents("쿠폰소멸예정");
|
|
|
+ custContactHst.setReceiverNo(coupon.getCustNo());
|
|
|
+ custContactHst.setSenderNo(senderNo);
|
|
|
+ custContactHst.setRegNo(senderNo);
|
|
|
+ coreCustomerService.createCustomerContactHistory(custContactHst);
|
|
|
+ } catch (Exception e) {
|
|
|
+ log.error("error", e);
|
|
|
+ // Do nothing
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
|
|
|
@@ -417,6 +660,7 @@ public class TscKakaotalkService {
|
|
|
* @author jssin
|
|
|
* @since 2021. 05. 28
|
|
|
*/
|
|
|
+ @Transactional("shopTxnManager")
|
|
|
public void sendCombackCoupon(Customer customer, CustCoupon custCoupon, Integer senderNo) {
|
|
|
SsgDirectMessage dm = new SsgDirectMessage();
|
|
|
dm.setFuserid(String.valueOf(senderNo)); // 발송자NO
|
|
|
@@ -426,6 +670,7 @@ public class TscKakaotalkService {
|
|
|
GagaMap replaceInfo = new GagaMap();
|
|
|
replaceInfo.setString("siteNm", siteNm);
|
|
|
replaceInfo.setString("custNm", customer.getCustNm());
|
|
|
+ replaceInfo.setString("custId", customer.getCustId());
|
|
|
replaceInfo.setInt("dcVal", custCoupon.getDcVal());
|
|
|
replaceInfo.setString("dcWay", custCoupon.getDcWay());
|
|
|
|