|
|
@@ -1,5 +1,7 @@
|
|
|
package com.style24.core.biz.service;
|
|
|
|
|
|
+import com.gagaframework.web.util.GagaDateUtil;
|
|
|
+import com.style24.persistence.domain.Coupon;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.core.env.Environment;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
@@ -16,6 +18,9 @@ import lombok.extern.slf4j.Slf4j;
|
|
|
|
|
|
import com.gagaframework.web.parameter.GagaMap;
|
|
|
|
|
|
+import java.text.SimpleDateFormat;
|
|
|
+import java.util.Date;
|
|
|
+
|
|
|
/**
|
|
|
* 카카오알림톡 Service. 모든 카카오알림톡 발송은 여기에서 처리한다.
|
|
|
*
|
|
|
@@ -84,15 +89,24 @@ public class TscKakaotalkService {
|
|
|
* @since 2020. 4. 9
|
|
|
*/
|
|
|
@Transactional("shopTxnManager")
|
|
|
- public void sendJoinCongrat(Customer customer, Integer senderNo) {
|
|
|
+ public void sendJoinCongrat(Customer customer, Coupon coupon, Integer senderNo) {
|
|
|
SsgDirectMessage dm = new SsgDirectMessage();
|
|
|
dm.setFuserid(String.valueOf(senderNo)); // 발송자NO
|
|
|
dm.setFdestine(customer.getCellPhnno());
|
|
|
dm.setFkkoresendtype("LMS");
|
|
|
|
|
|
+ SimpleDateFormat formatter = new SimpleDateFormat("yyyy.MM.dd");
|
|
|
+ Date currentTime = new Date();
|
|
|
+ String today = formatter.format(currentTime);
|
|
|
+
|
|
|
+
|
|
|
GagaMap replaceInfo = new GagaMap();
|
|
|
replaceInfo.setString("siteNm", siteNm);
|
|
|
replaceInfo.setString("custNm", customer.getCustNm());
|
|
|
+ replaceInfo.setString("custId", customer.getCustId());
|
|
|
+ replaceInfo.setString("cpnNm", customer.getCpnNm());
|
|
|
+ replaceInfo.setString("joinDt", today);
|
|
|
+
|
|
|
replaceInfo.set("custNo", customer.getCustNo());
|
|
|
kakaoSender.send(SsgKakaoSender.KakaoAnswerSq.JOIN_CONGRATS.value(), dm, replaceInfo);
|
|
|
|