|
|
@@ -1,8 +1,8 @@
|
|
|
package com.style24.core.biz.service;
|
|
|
|
|
|
-import com.gagaframework.web.util.GagaDateUtil;
|
|
|
-import com.style24.persistence.domain.Coupon;
|
|
|
-import com.style24.persistence.domain.CustCoupon;
|
|
|
+import java.text.SimpleDateFormat;
|
|
|
+import java.util.Date;
|
|
|
+
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.core.env.Environment;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
@@ -11,7 +11,9 @@ import org.springframework.transaction.annotation.Transactional;
|
|
|
import com.style24.core.biz.thirdparty.NaverShortUrl;
|
|
|
import com.style24.core.biz.thirdparty.SsgKakaoSender;
|
|
|
import com.style24.core.support.env.TscConstants;
|
|
|
+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.GiftCard;
|
|
|
import com.style24.persistence.domain.SsgDirectMessage;
|
|
|
@@ -20,9 +22,6 @@ import lombok.extern.slf4j.Slf4j;
|
|
|
|
|
|
import com.gagaframework.web.parameter.GagaMap;
|
|
|
|
|
|
-import java.text.SimpleDateFormat;
|
|
|
-import java.util.Date;
|
|
|
-
|
|
|
/**
|
|
|
* 카카오알림톡 Service. 모든 카카오알림톡 발송은 여기에서 처리한다.
|
|
|
*
|
|
|
@@ -400,4 +399,48 @@ public class TscKakaotalkService {
|
|
|
// Do nothing
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ //----------------------------
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 재입고 발송
|
|
|
+ * @param customer
|
|
|
+ * @param goods
|
|
|
+ * @param senderNo
|
|
|
+ * @author eskim
|
|
|
+ * @since 2021. 5. 28
|
|
|
+ */
|
|
|
+ @Transactional("shopTxnManager")
|
|
|
+ public void goodsRestock(GagaMap goods, Integer senderNo) {
|
|
|
+ SsgDirectMessage dm = new SsgDirectMessage();
|
|
|
+ dm.setFuserid(String.valueOf(senderNo)); // 발송자NO======>
|
|
|
+ dm.setFdestine(goods.getString("cellPhnno"));
|
|
|
+ dm.setFkkoresendtype("LMS");
|
|
|
+
|
|
|
+ GagaMap replaceInfo = new GagaMap();
|
|
|
+ replaceInfo.setString("siteNm", siteNm);
|
|
|
+ replaceInfo.setString("custNm", goods.getString("custNm"));
|
|
|
+ replaceInfo.setString("goodsNm", goods.getString("goodsNm"));
|
|
|
+ replaceInfo.setString("optCd1", goods.getString("optCd1Nm"));
|
|
|
+ replaceInfo.setString("optCd2", goods.getString("optCd2"));
|
|
|
+ kakaoSender.send(SsgKakaoSender.KakaoAnswerSq.GOODS_RESTOCK.value(), dm, replaceInfo);
|
|
|
+
|
|
|
+ try {
|
|
|
+ // 고객접촉이력 정보
|
|
|
+ CustContactHst custContactHst = new CustContactHst();
|
|
|
+ custContactHst.setContactType(TscConstants.ContactType.GOODS_RESTOCK.value()); // 접촉유형:알림톡(공통코드G054)
|
|
|
+ custContactHst.setContactMethod(TscConstants.ContactMethod.KAKAOTALK.value()); // 접촉방법:알림톡+문자(공통코드G055)
|
|
|
+ custContactHst.setContactContents("재입고안내");
|
|
|
+ custContactHst.setReceiverNo(goods.getInt("custNo"));
|
|
|
+ custContactHst.setSenderNo(senderNo);
|
|
|
+ custContactHst.setRegNo(senderNo);
|
|
|
+ coreCustomerService.createCustomerContactHistory(custContactHst);
|
|
|
+ } catch (Exception e) {
|
|
|
+ log.error("error", e);
|
|
|
+ // Do nothing
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ //----------------------------
|
|
|
}
|