|
|
@@ -251,6 +251,47 @@ public class TscKakaotalkService {
|
|
|
// 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
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
/**
|
|
|
* 개인정보 이용내역 안내
|
|
|
@@ -399,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
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
|