|
|
@@ -8,6 +8,8 @@ import com.style24.persistence.domain.Coupon;
|
|
|
import com.style24.persistence.domain.CustContactHst;
|
|
|
import com.style24.persistence.domain.CustCoupon;
|
|
|
import com.style24.persistence.domain.Customer;
|
|
|
+import com.style24.persistence.domain.Point;
|
|
|
+
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
@@ -426,7 +428,42 @@ public class TscMailService {
|
|
|
// Do nothing
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 포인트 만료예정 안내(30일)
|
|
|
+ *
|
|
|
+ * @param customer - 고객 정보
|
|
|
+ * @param point - 포인트정보
|
|
|
+ * @param senderNo - 보낸
|
|
|
+ * @author sowon
|
|
|
+ * @since 2021. 06. 08
|
|
|
+ */
|
|
|
+ @Transactional("shopTxnManager")
|
|
|
+ public void sendPointExpectNotify(Point point, Integer senderNo) {
|
|
|
+
|
|
|
+ GagaMap replaceInfo = new GagaMap();
|
|
|
+ replaceInfo.setInt("custNo", point.getCustNo());
|
|
|
+ replaceInfo.setString("custNm", point.getCustNm());
|
|
|
+ replaceInfo.setInt("rmPntAmt", point.getRmPntAmt());
|
|
|
+ replaceInfo.setString("expBeDt", point.getExpBeDt());
|
|
|
+ replaceInfo.setString("today", point.getToday());
|
|
|
|
|
|
+ netpathyMailSender.send(NetpathyMailSender.MailAnswerSq.POINT_EXTNC_EXPECT.value(), point.getEmail(), replaceInfo);
|
|
|
|
|
|
+ try {
|
|
|
+ // 고객접촉이력 정보
|
|
|
+ CustContactHst custContactHst = new CustContactHst();
|
|
|
+ custContactHst.setContactType(TscConstants.ContactType.COUPON_EXTNC_EXPECT.value()); // 접촉유형:임시비밀번호발급(공통코드G054)
|
|
|
+ custContactHst.setContactMethod(TscConstants.ContactMethod.EMAIL.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
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
}
|