Ver Fonte

1:1문의관리, 상품문의관리 수정

gagamel há 5 anos atrás
pai
commit
6126db0c4b

+ 9 - 6
style24.admin/src/main/java/com/style24/admin/biz/web/TsaCustomerController.java

@@ -142,17 +142,20 @@ public class TsaCustomerController extends TsaBaseController {
 		// 일대일문의상세 조회
 		Counsel tCounsel = counselService.getOneToOneQna(counsel.getCounselSq());
 
-//		try {
-//			// 답변완료 카카오알림톡 발송
-//			kakaoService.sendOnetoOneAnswer(tCounsel);
-//		} catch (Exception e) {
-//			// Do nothing
+//		// TODO. 고객이 SMS답변수신을 요청했을 때
+//		if (counsel.getSmsReqYn().equals("Y")) {
+//			try {
+//				// 답변완료안내 카카오알림톡 발송
+//				kakaoService.sendOnetoOneAnswer(tCounsel);
+//			} catch (Exception e) {
+//				// Do nothing
+//			}
 //		}
 
 		// 고객이 이메일답변수신을 요청했을 때
 //		if (counsel.getEmailReqYn().equals("Y")) {
 //			try {
-//				// 답변 메일 발송
+//				// 답변완료안내 메일 발송
 //				mailService.sendOneToOneAnswer(tCounsel);
 //			} catch (Exception e) {
 //				// Do nothing

+ 4 - 2
style24.admin/src/main/java/com/style24/persistence/domain/Counsel.java

@@ -26,9 +26,11 @@ public class Counsel extends TscBaseDomain {
 	private String custId;			// 고객ID
 	private String custNm;			// 고객명
 	private String cellPhnno;		// 휴대전화번호
+	private String smsReqYn;		// SMS(알림톡)요청여부
+	private String smsSendYn;		// SMS(알림톡)발송여부
 	private String email;			// 이메일
-	private String emailReqYn;		// 이메일요청여부
-	private String emailSendYn;		// 이메일발송여부
+//	private String emailReqYn;		// 이메일요청여부
+//	private String emailSendYn;		// 이메일발송여부
 	private String relGoodsCd;		// 관련상품코드(상품문의에서만 사용)
 	private String goodsNm;			// 상품명(상품문의에서만 사용)
 	private String selfGoodsYn;		// 자사상품여부(상품문의에서만 사용)

+ 18 - 9
style24.admin/src/main/java/com/style24/persistence/mybatis/shop/TsaCounsel.xml

@@ -16,9 +16,11 @@
 		     , B.CUST_ID                                                           /*고객ID*/
 		     , B.CUST_NM                                                           /*고객명*/
 		     , A.CELL_PHNNO                                                        /*휴대전화번호*/
+		     , A.SMS_REQ_YN                                                        /*SMS요청여부*/
+		     , A.SMS_SEND_YN                                                       /*SMS발송여부*/
 		     , A.EMAIL                                                             /*이메일*/
-		     , A.EMAIL_REQ_YN                                                      /*이메일요청여부*/
-		     , A.EMAIL_SEND_YN                                                     /*이메일발송여부*/
+		     -- , A.EMAIL_REQ_YN                                                      /*이메일요청여부*/
+		     -- , A.EMAIL_SEND_YN                                                     /*이메일발송여부*/
 		     , A.ANS_STAT                                                          /*답변상태*/
 		     , DATE_FORMAT(A.ANS_DT, '%Y-%m-%d %H:%i:%S')      AS ANS_DT           /*답변일시*/
 		     , A.ANS_NO                                                            /*답변자번호*/
@@ -76,9 +78,11 @@
 		     , B.CUST_ID                                                          /*고객ID*/
 		     , B.CUST_NM                                                          /*고객명*/
 		     , A.CELL_PHNNO                                                       /*휴대전화번호*/
+		     , A.SMS_REQ_YN                                                       /*SMS요청여부*/
+		     , A.SMS_SEND_YN                                                      /*SMS발송여부*/
 		     , A.EMAIL                                                            /*이메일*/
-		     , A.EMAIL_REQ_YN                                                     /*이메일요청여부*/
-		     , A.EMAIL_SEND_YN                                                    /*이메일발송여부*/
+		     -- , A.EMAIL_REQ_YN                                                     /*이메일요청여부*/
+		     -- , A.EMAIL_SEND_YN                                                    /*이메일발송여부*/
 		     , DATE_FORMAT(A.QUEST_DT,'%Y-%m-%d %H:%i:%S')    AS QUEST_DT         /*문의일시*/
 		     , A.ANS_NO                                                           /*답변자번호*/
 		     , C.USER_NM                                      AS ANS_NM           /*답변자명*/
@@ -104,7 +108,8 @@
 	<update id="updateQnaAnswer" parameterType="Counsel">
 		/* TsaCounsel.updateQnaAnswer */
 		UPDATE TB_COUNSEL
-		SET    EMAIL_SEND_YN = EMAIL_REQ_YN /*이메일답변수신 값에 따라 이메일을 먼저 발송함으로 이메일답변수신 값과 동일하게 처리*/
+		SET    SMS_SEND_YN = SMS_REQ_YN /*SMS답변수신 값에 따라 SMS를 먼저 발송함으로 SMS답변수신 값과 동일하게 처리*/
+		     -- , EMAIL_SEND_YN = EMAIL_REQ_YN /*이메일답변수신 값에 따라 이메일을 먼저 발송함으로 이메일답변수신 값과 동일하게 처리*/
 		     , ANS_TITLE = #{ansTitle}
 		     , ANS_CONTENT = #{ansContent}
 		     , ANS_STAT = 'G060_20' /*답변완료*/
@@ -126,9 +131,11 @@
 		     , B.CUST_ID                                                           /*고객ID*/
 		     , B.CUST_NM                                                           /*고객명*/
 		     , A.CELL_PHNNO                                                        /*휴대전화번호*/
+		     , A.SMS_REQ_YN                                                        /*SMS요청여부*/
+		     , A.SMS_SEND_YN                                                       /*SMS발송여부*/
 		     , A.EMAIL                                                             /*이메일*/
-		     , A.EMAIL_REQ_YN                                                      /*이메일요청여부*/
-		     , A.EMAIL_SEND_YN                                                     /*이메일발송여부*/
+		     -- , A.EMAIL_REQ_YN                                                      /*이메일요청여부*/
+		     -- , A.EMAIL_SEND_YN                                                     /*이메일발송여부*/
 		     , A.REL_GOODS_CD                                                      /*관련상품코드*/
 		     , G.GOODS_NM                                                          /*상품명*/
 		     , A.ANS_STAT                                                          /*답변상태*/
@@ -206,9 +213,11 @@
 		     , B.CUST_ID                                                           /*고객ID*/
 		     , B.CUST_NM                                                           /*고객명*/
 		     , A.CELL_PHNNO                                                        /*휴대전화번호*/
+		     , A.SMS_REQ_YN                                                        /*SMS요청여부*/
+		     , A.SMS_SEND_YN                                                       /*SMS발송여부*/
 		     , A.EMAIL                                                             /*이메일*/
-		     , A.EMAIL_REQ_YN                                                      /*이메일요청여부*/
-		     , A.EMAIL_SEND_YN                                                     /*이메일발송여부*/
+		     -- , A.EMAIL_REQ_YN                                                      /*이메일요청여부*/
+		     -- , A.EMAIL_SEND_YN                                                     /*이메일발송여부*/
 		     , A.REL_GOODS_CD                                                      /*관련상품코드*/
 		     , G.GOODS_NM                                                          /*상품명*/
 		     , G.SELF_GOODS_YN                                                     /*자사상품여부*/

+ 11 - 11
style24.admin/src/main/webapp/WEB-INF/views/customer/GoodsQnaDetailForm.html

@@ -27,18 +27,18 @@
 		<div class="panelContent">
 			<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="emailReqYn" th:value="*{emailReqYn}"/>
+				<input type="hidden" name="smsReqYn" th:value="*{smsReqYn}"/>
 				
 				<h4>상담정보</h4>
 				<table class="tableStyle" aria-describedby="상담정보">
 					<colgroup>
 						<col style="width:10%;"/>
 						<col style="width:10%;"/>
-						<col style="width:10%;"/>
-						<col style="width:15%;"/>
+						<col style="width:8%;"/>
+						<col style="width:12%;"/>
 						<col/>
-						<col style="width:15%;"/>
-						<col style="width:25%;"/>
+						<col style="width:22%;"/>
+						<col style="width:22%;"/>
 					</colgroup>
 					<thead>
 						<tr>
@@ -57,9 +57,9 @@
 							<td th:text="*{siteNm}"></td>
 							<td>상품문의</td>
 							<td th:text="*{questDt}"></td>
-							<td th:utext="*{custNm + ' / ' + cellPhnno + ' / ' + email}"></td>
-							<td th:utext="*{ansTransYn == 'Y' ? ansTransDt + ' / ' + ansCompNm : ''}"></td>
-							<td th:utext="*{ansStat == '20' ? ansStatNm + ' / ' + ansDt + ' / ' + ansNm : ansStatNm}"></td>
+							<td th:utext="*{custNm + ' / ' + cellPhnno + '<br/>' + email}"></td>
+							<td th:utext="*{ansTransYn == 'Y' ? ansTransDt + '<br/>' + ansCompNm : ''}"></td>
+							<td th:utext="*{ansStat == 'G060_20' ? ansStatNm + ' / ' + ansDt + '<br/>' + ansNm : ansStatNm}"></td>
 						</tr>
 					</tbody>
 				</table>
@@ -88,8 +88,8 @@
 						<tr>
 							<th>비밀글여부</th>
 							<td th:text="*{secretYn == 'Y' ? 'Yes' : 'No'}"></td>
-							<th>이메일답변요청</th>
-							<td th:text="*{emailReqYn == 'Y' ? '수신' : '미수신'}"></td>
+							<th>SMS답변요청</th>
+							<td th:text="*{smsReqYn == 'Y' ? '수신' : '미수신'}"></td>
 						</tr>
 						<tr>
 							<th>문의 내용</th>
@@ -149,7 +149,7 @@
 					</select>
 					<button type="button" class="btn btn-danger btn-lg" id="btnTransferAnswer">답변의뢰</button>
 				</span>
-				<button type="button" class="btn btn-info btn-lg" id="btnSaveAnswer">답변저장</button>
+				<button type="button" class="btn btn-info btn-lg" id="btnSaveAnswer" th:if="${counselInfo.ansStat == 'G060_10'}">답변저장</button>
 			</li>
 		</ul>
 		<!-- //버튼 배치 영역 -->

+ 16 - 2
style24.admin/src/main/webapp/WEB-INF/views/customer/GoodsQnaForm.html

@@ -142,9 +142,23 @@
 			cellRenderer: function(params) { return '<a href="javascript:void(0);">' + params.value + '(' + params.data.custId + ')</a>'; }
 		},
 		{headerName: "휴대전화번호", field: "cellPhnno", width: 120, cellClass: 'text-center'},
+		{
+			headerName: "SMS답변요청", field: "smsReqYn", width: 120, cellClass: 'text-center',
+			cellRenderer: function(params) { return params.value == 'Y' ? 'Yes' : 'No'; }
+		},
+		{
+			headerName: "SMS답변발송", field: "smsSendYn", width: 120, cellClass: 'text-center',
+			cellRenderer: function(params) { return params.value == 'Y' ? 'Yes' : 'No'; }
+		},
 		{headerName: "이메일", field: "email", width: 200},
-		{headerName: "이메일답변요청", field: "emailReqYn", width: 120, cellClass: 'text-center'},
-		{headerName: "이메일답변발송", field: "emailSendYn", width: 120, cellClass: 'text-center'},
+// 		{
+// 			headerName: "이메일답변요청", field: "emailReqYn", width: 120, cellClass: 'text-center',
+// 			cellRenderer: function(params) { return params.value == 'Y' ? 'Yes' : 'No'; }
+// 		},
+// 		{
+// 			headerName: "이메일답변발송", field: "emailSendYn", width: 120, cellClass: 'text-center',
+// 			cellRenderer: function(params) { return params.value == 'Y' ? 'Yes' : 'No'; }
+// 		},
 		{
 			headerName: "답변상태", field: "ansStat", width: 100, cellClass: 'text-center',
 			cellRenderer: function (params) { return gagaAgGrid.lookupValue(ansStatList, params.value); }

+ 5 - 5
style24.admin/src/main/webapp/WEB-INF/views/customer/OneToOneQnaDetailForm.html

@@ -27,7 +27,7 @@
 		<div class="panelContent">
 			<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="emailReqYn" th:value="*{emailReqYn}"/>
+				<input type="hidden" name="smsReqYn" th:value="*{smsReqYn}"/>
 				
 				<h4>상담정보</h4>
 				<table class="tableStyle" aria-describedby="상담정보">
@@ -62,7 +62,7 @@
 							<td th:utext="*{custNm + ' / ' + cellPhnno + ' / ' + email}"></td>
 <!-- 							<td th:text="*{relOrdNo}"></td> -->
 <!-- 							<td th:utext="*{ansTransYn == 'Y' ? ansTransDt + '<br/>' + ansCompNm : ''}"></td> -->
-							<td th:utext="*{ansStat == '20' ? ansStatNm + ' / ' + ansDt + ' / ' + ansNm : ansStatNm}"></td>
+							<td th:utext="*{ansStat == 'G060_20' ? ansStatNm + ' / ' + ansDt + ' / ' + ansNm : ansStatNm}"></td>
 						</tr>
 					</tbody>
 				</table>
@@ -79,8 +79,8 @@
 						<tr>
 							<th>문의 제목</th>
 							<td th:text="*{questTitle}"></td>
-							<th>이메일답변요청</th>
-							<td th:text="*{emailReqYn == 'Y' ? '수신' : '미수신'}"></td>
+							<th>SMS답변요청</th>
+							<td th:text="*{smsReqYn == 'Y' ? '수신' : '미수신'}"></td>
 						</tr>
 						<tr>
 							<th>문의 내용</th>
@@ -135,7 +135,7 @@
 		<!-- 버튼 배치 영역 -->
 		<ul class="panelBar">
 			<li class="right">
-				<button type="button" class="btn btn-info btn-lg" id="btnSaveAnswer">답변저장</button>
+				<button type="button" class="btn btn-info btn-lg" id="btnSaveAnswer" th:if="${counselInfo.ansStat == 'G060_10'}">답변저장</button>
 			</li>
 		</ul>
 		<!-- //버튼 배치 영역 -->

+ 11 - 3
style24.admin/src/main/webapp/WEB-INF/views/customer/OneToOneQnaForm.html

@@ -131,15 +131,23 @@
 			cellRenderer: function(params) { return '<a href="javascript:void(0);">' + params.value + '(' + params.data.custId + ')</a>'; }
 		},
 		{headerName: "휴대전화번호", field: "cellPhnno", width: 120, cellClass: 'text-center'},
-		{headerName: "이메일", field: "email", width: 200},
 		{
-			headerName: "이메일답변요청", field: "emailReqYn", width: 120, cellClass: 'text-center',
+			headerName: "SMS답변요청", field: "smsReqYn", width: 120, cellClass: 'text-center',
 			cellRenderer: function(params) { return params.value == 'Y' ? 'Yes' : 'No'; }
 		},
 		{
-			headerName: "이메일답변발송", field: "emailSendYn", width: 120, cellClass: 'text-center',
+			headerName: "SMS답변발송", field: "smsSendYn", width: 120, cellClass: 'text-center',
 			cellRenderer: function(params) { return params.value == 'Y' ? 'Yes' : 'No'; }
 		},
+		{headerName: "이메일", field: "email", width: 200},
+// 		{
+// 			headerName: "이메일답변요청", field: "emailReqYn", width: 120, cellClass: 'text-center',
+// 			cellRenderer: function(params) { return params.value == 'Y' ? 'Yes' : 'No'; }
+// 		},
+// 		{
+// 			headerName: "이메일답변발송", field: "emailSendYn", width: 120, cellClass: 'text-center',
+// 			cellRenderer: function(params) { return params.value == 'Y' ? 'Yes' : 'No'; }
+// 		},
 		{
 			headerName: "답변상태", field: "ansStat", width: 100, cellClass: 'text-center',
 			cellRenderer: function (params) { return gagaAgGrid.lookupValue(ansStatList, params.value); }