|
|
@@ -1,11 +1,19 @@
|
|
|
package com.style24.admin.biz.service;
|
|
|
|
|
|
+import com.gagaframework.web.parameter.GagaMap;
|
|
|
+import com.style24.admin.support.security.session.TsaSession;
|
|
|
+import com.style24.core.biz.service.TscCustomerService;
|
|
|
+import com.style24.core.support.env.TscConstants;
|
|
|
+import com.style24.persistence.domain.CustContactHst;
|
|
|
+import com.style24.persistence.domain.Customer;
|
|
|
+import com.style24.persistence.domain.SsgDirectMessage;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
import com.style24.core.biz.thirdparty.SsgKakaoSender;
|
|
|
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
+import org.springframework.transaction.annotation.Transactional;
|
|
|
|
|
|
/**
|
|
|
* 카카오알림톡 Service. 모든 카카오알림톡 발송은 여기에서 처리한다.
|
|
|
@@ -20,38 +28,43 @@ public class TsaKakaoService {
|
|
|
@Autowired
|
|
|
private SsgKakaoSender kakaoSender;
|
|
|
|
|
|
-// /**
|
|
|
-// * 고객 임시비밀번호 알림톡 발송
|
|
|
-// * @param counsel - 상담 정보
|
|
|
-// * @author gagamel
|
|
|
-// * @since 2020. 11. 9
|
|
|
-// */
|
|
|
-// @Transactional("shopTxnManager")
|
|
|
-// public void sendCustomerTempPassword(AdmCustomer customer) {
|
|
|
-// SsgDirectMessage dm = new SsgDirectMessage();
|
|
|
-// dm.setFuserid(String.valueOf(TsaSession.getInfo().getUserNo())); // 발송자ID
|
|
|
-// dm.setFdestine(customer.getCellPhnno());
|
|
|
-// dm.setFkkoresendtype("LMS");
|
|
|
-//
|
|
|
-// GagaMap replaceInfo = new GagaMap();
|
|
|
-// replaceInfo.setString("siteNm", customer.getSiteNm());
|
|
|
-// replaceInfo.setString("custNm", customer.getCustNm());
|
|
|
-// replaceInfo.setString("passwd", customer.getPasswd());
|
|
|
-//
|
|
|
-// kakaoSender.send(SsgKakaoSender.KakaoAnswerSq.TempPasswd.value(), dm, replaceInfo);
|
|
|
-//
|
|
|
-// try {
|
|
|
-// // 고객접촉이력 정보
|
|
|
-// customer.setContactType("203"); // 접촉유형:임시비밀번호발급(공통코드G054)
|
|
|
-// customer.setContactMethod(TscConstants.ContactMethod.KAKAOTALK.value()); // 접촉방법:알림톡+문자(공통코드G055)
|
|
|
-// customer.setContactContents("고객 임시비밀번호 발송");
|
|
|
-// customer.setReceiverId(customer.getCustNo());
|
|
|
-// customerService.createCustomerContactHistory(customer);
|
|
|
-// } catch (Exception e) {
|
|
|
-// log.error("error", e);
|
|
|
-// // Do nothing
|
|
|
-// }
|
|
|
-// }
|
|
|
+ @Autowired
|
|
|
+ private TscCustomerService coreCustomerService;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 고객 임시비밀번호 알림톡 발송
|
|
|
+ * @param customer - 고객 정보
|
|
|
+ * @author jsshin
|
|
|
+ * @since 2021. 01. 20
|
|
|
+ */
|
|
|
+ @Transactional("shopTxnManager")
|
|
|
+ public void sendCustomerTempPassword(Customer customer) {
|
|
|
+ Integer userNo = TsaSession.getInfo().getUserNo();
|
|
|
+ SsgDirectMessage dm = new SsgDirectMessage();
|
|
|
+ dm.setFuserid(String.valueOf(userNo)); // 발송자NO
|
|
|
+ dm.setFdestine(customer.getCellPhnno());
|
|
|
+ dm.setFkkoresendtype("LMS");
|
|
|
+
|
|
|
+ GagaMap replaceInfo = new GagaMap();
|
|
|
+ replaceInfo.setString("siteNm", TscConstants.Style24Infomation.SITE_NAME.value());
|
|
|
+ replaceInfo.setString("custNm", customer.getCustNm());
|
|
|
+ replaceInfo.setString("passwd", customer.getPasswd());
|
|
|
+
|
|
|
+ kakaoSender.send(SsgKakaoSender.KakaoAnswerSq.TempPasswd.value(), dm, replaceInfo);
|
|
|
+
|
|
|
+ try {
|
|
|
+ CustContactHst custContactHst = new CustContactHst();
|
|
|
+ custContactHst.setContactType(TscConstants.ContactType.PASSWORD_INFO.value()); // 접촉유형:임시비밀번호발급(공통코드G054)
|
|
|
+ custContactHst.setContactMethod(TscConstants.ContactMethod.KAKAOTALK.value()); // 접촉방법:알림톡+문자(공통코드G055)
|
|
|
+ custContactHst.setContactContents("고객 임시비밀번호 발송");
|
|
|
+ custContactHst.setReceiverNo(customer.getCustNo());
|
|
|
+ custContactHst.setSenderNo(userNo);
|
|
|
+ coreCustomerService.createCustomerContactHistory(custContactHst);
|
|
|
+ } catch (Exception e) {
|
|
|
+ log.error("error", e);
|
|
|
+ // Do nothing
|
|
|
+ }
|
|
|
+ }
|
|
|
//
|
|
|
// /**
|
|
|
// * 일대일문의 답변 알림톡 발송
|