|
|
@@ -14,6 +14,7 @@ import com.style24.core.support.env.TscConstants;
|
|
|
import com.style24.persistence.domain.CustContactHst;
|
|
|
import com.style24.persistence.domain.Customer;
|
|
|
import com.style24.persistence.domain.GiftCard;
|
|
|
+import com.style24.persistence.domain.Point;
|
|
|
import com.style24.persistence.domain.SsgDirectMessage;
|
|
|
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
@@ -188,6 +189,45 @@ public class TscKakaotalkService {
|
|
|
}
|
|
|
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 포인트 기간만료 알림톡(30일)
|
|
|
+ * @param point - 상품권 정보
|
|
|
+ * @param senderNo - 발송자번호(고객번호)
|
|
|
+ * @author sowon
|
|
|
+ * @since 2021. 5. 28
|
|
|
+ */
|
|
|
+ @Transactional("shopTxnManager")
|
|
|
+ public void sendPointExpectNotify(Point point, Integer senderNo) {
|
|
|
+ SsgDirectMessage dm = new SsgDirectMessage();
|
|
|
+ dm.setFuserid(String.valueOf(senderNo)); // 발송자NO
|
|
|
+ dm.setFdestine(point.getCellPhnno());
|
|
|
+ dm.setFkkoresendtype("LMS");
|
|
|
+
|
|
|
+ GagaMap replaceInfo = new GagaMap();
|
|
|
+ replaceInfo.setString("siteNm", siteNm);
|
|
|
+ replaceInfo.setString("custNm", point.getCustNm());
|
|
|
+ replaceInfo.setString("rmPntAmt", Integer.toString(point.getRmPntAmt()));
|
|
|
+ replaceInfo.setString("expBeDt", point.getExpBeDt());
|
|
|
+ kakaoSender.send(SsgKakaoSender.KakaoAnswerSq.POINT_EXTNC_EXPECT.value(), dm, replaceInfo);
|
|
|
+
|
|
|
+ try {
|
|
|
+ // 고객접촉이력 정보
|
|
|
+ CustContactHst custContactHst = new CustContactHst();
|
|
|
+ custContactHst.setContactType(TscConstants.ContactType.POINT_EXTNC_EXPECT.value()); // 접촉유형:임시비밀번호발급(공통코드G054)
|
|
|
+ custContactHst.setContactMethod(TscConstants.ContactMethod.KAKAOTALK.value()); // 접촉방법:알림톡+문자(공통코드G055)
|
|
|
+ custContactHst.setContactContents("포인트소멸예정");
|
|
|
+ custContactHst.setReceiverNo(point.getCustNo());
|
|
|
+ custContactHst.setSenderNo(senderNo);
|
|
|
+ custContactHst.setRegNo(senderNo);
|
|
|
+ coreCustomerService.createCustomerContactHistory(custContactHst);
|
|
|
+ } catch (Exception e) {
|
|
|
+ log.error("error", e);
|
|
|
+ // Do nothing
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
|
|
|
|
|
|
// /**
|