|
|
@@ -7,6 +7,7 @@ import java.util.List;
|
|
|
import javax.servlet.http.HttpServletRequest;
|
|
|
import javax.servlet.http.HttpSession;
|
|
|
|
|
|
+import com.style24.core.biz.service.TscKakaotalkService;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.core.env.Environment;
|
|
|
@@ -61,6 +62,9 @@ public class TsfCustomerService {
|
|
|
@Autowired
|
|
|
private TsfCouponService couponService;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private TscKakaotalkService kakaotalkService;
|
|
|
+
|
|
|
@Autowired
|
|
|
private ObjectMapper objectMapper;
|
|
|
|
|
|
@@ -278,6 +282,26 @@ public class TsfCustomerService {
|
|
|
isJoin = false;
|
|
|
}
|
|
|
|
|
|
+ if(isJoin) {
|
|
|
+ Coupon coupon = couponService.getJoinCouponInfo();
|
|
|
+ // 알림톡 발송
|
|
|
+ try {
|
|
|
+ if (StringUtils.isNotBlank(customer.getCellPhnno())) {
|
|
|
+ kakaotalkService.sendJoinCongrat(customer, coupon, customer.getCustNo());
|
|
|
+ }
|
|
|
+ } catch (Exception e) {
|
|
|
+ log.error("error", e);
|
|
|
+ }
|
|
|
+
|
|
|
+ // 이메일 발송
|
|
|
+ try {
|
|
|
+ if (StringUtils.isNotBlank(customer.getEmail())) {
|
|
|
+ // TODO : 2021.02.23 이메일 모듈 개발 필요 jsshin
|
|
|
+ }
|
|
|
+ } catch (Exception e) {
|
|
|
+ log.error("error", e);
|
|
|
+ }
|
|
|
+ }
|
|
|
return isJoin;
|
|
|
}
|
|
|
|
|
|
@@ -319,6 +343,27 @@ public class TsfCustomerService {
|
|
|
isJoin = false;
|
|
|
}
|
|
|
|
|
|
+ if (isJoin) {
|
|
|
+ Coupon coupon = couponService.getJoinCouponInfo();
|
|
|
+ // 알림톡 발송
|
|
|
+ try {
|
|
|
+ if (StringUtils.isNotBlank(customer.getCellPhnno())) {
|
|
|
+ kakaotalkService.sendJoinCongrat(customer, coupon, customer.getCustNo());
|
|
|
+ }
|
|
|
+ } catch (Exception e) {
|
|
|
+ log.error("error", e);
|
|
|
+ }
|
|
|
+
|
|
|
+ // 이메일 발송
|
|
|
+ try {
|
|
|
+ if (StringUtils.isNotBlank(customer.getEmail())) {
|
|
|
+ // TODO : 2021.02.23 이메일 모듈 개발 필요 jsshin
|
|
|
+ }
|
|
|
+ } catch (Exception e) {
|
|
|
+ log.error("error", e);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
return isJoin;
|
|
|
|
|
|
}
|