فهرست منبع

상품문의 알림톡

sowon4187 4 سال پیش
والد
کامیت
e2955e4ea5

+ 16 - 9
src/main/java/com/style24/scm/biz/web/TssCustomerController.java

@@ -13,6 +13,7 @@ import org.springframework.web.bind.annotation.ResponseBody;
 import org.springframework.web.servlet.ModelAndView;
 
 import com.style24.core.biz.service.TscAnswerPhaseService;
+import com.style24.core.biz.service.TscKakaotalkService;
 import com.style24.core.support.message.TscMessageByLocale;
 import com.style24.persistence.domain.AnswerPhase;
 import com.style24.persistence.domain.Counsel;
@@ -47,6 +48,9 @@ public class TssCustomerController extends TssBaseController {
 
 	@Autowired
 	private TscAnswerPhaseService ansPhaseService;
+	
+	@Autowired
+	private TscKakaotalkService kakaotalkService;
 
 	/**
 	* 상품문의관리 화면
@@ -139,15 +143,18 @@ public class TssCustomerController extends TssBaseController {
 		// 상품문의상세 조회
 		Counsel tCounsel = counselService.getGoodsQna(counsel.getCounselSq());
 
-//		// TODO. 고객이 SMS답변수신을 요청했을 때
-//		if (counsel.getSmsReqYn().equals("Y")) {
-//			try {
-//				// 답변완료안내 카카오알림톡 발송
-//				kakaoService.sendQnaAnswer(tCounsel);
-//			} catch (Exception e) {
-//				// Do nothing
-//			}
-//		}
+		// TODO. 고객이 SMS답변수신을 요청했을 때
+		if (counsel.getSmsReqYn().equals("Y")) {
+			try {
+				if (counsel.getCounselType().equals("G")) {
+					//답변완료안내 카카오알림톡 발송
+					kakaotalkService.sendGoodsAskNotify(tCounsel,tCounsel.getCustNo());
+				}
+				// 		
+			} catch (Exception e) {
+				// Do nothing
+			}
+		}
 
 		return super.ok(message.getMessage("SUCC_0001"));
 	}

+ 1 - 0
src/main/webapp/WEB-INF/views/customer/GoodsQnaDetailForm.html

@@ -28,6 +28,7 @@
 			<form id="qnaDetailForm" name="qnaDetailForm" action="#" th:action="@{'/customer/qna/answer/save'}" th:method="post" th:object="${counselInfo}">
 				<input type="hidden" name="counselSq" th:value="*{counselSq}"/>
 				<input type="hidden" name="smsReqYn" th:value="*{smsReqYn}"/>
+				<input type="hidden" name="counselType" value="G"/>
 				
 				<h4>상담정보</h4>
 				<table class="tableStyle" aria-describedby="상담정보">