Explorar o código

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

gagamel %!s(int64=5) %!d(string=hai) anos
pai
achega
63b2cec26f

+ 1 - 1
style24.admin/src/main/java/com/style24/admin/biz/service/TsaCounselService.java

@@ -85,7 +85,7 @@ public class TsaCounselService {
 		counsel.setCounselSq(counselSq);
 		counsel.setRoleCd(TsaSession.getInfo().getRoleCd());
 		counsel.setSupplyCompCd(TsaSession.getInfo().getSupplyCompCd());
-		return counselDao.getOneToOneQna(counsel);
+		return counselDao.getGoodsQna(counsel);
 	}
 
 	/**

+ 13 - 10
style24.admin/src/main/java/com/style24/admin/biz/web/TsaCustomerController.java

@@ -143,17 +143,20 @@ public class TsaCustomerController extends TsaBaseController {
 		Counsel tCounsel = counselService.getOneToOneQna(counsel.getCounselSq());
 
 //		try {
-//			// 일대일문의 답변 메일 발송
-//			mailService.sendOneToOneAnswer(tCounsel);
-//		} catch (Exception e) {
-//			// Do nothing
-//		}
-//
-//		try {
-//			// 일대일문의 답변 카카오알림톡 발송
+//			// 답변완료 카카오알림톡 발송
 //			kakaoService.sendOnetoOneAnswer(tCounsel);
 //		} catch (Exception e) {
 //			// Do nothing
+//		}
+
+		// 고객이 이메일답변수신을 요청했을 때
+//		if (counsel.getEmailReqYn().equals("Y")) {
+//			try {
+//				// 답변 메일 발송
+//				mailService.sendOneToOneAnswer(tCounsel);
+//			} catch (Exception e) {
+//				// Do nothing
+//			}
 //		}
 
 		return super.ok(message.getMessage("SUCC_0001"));
@@ -210,8 +213,8 @@ public class TsaCustomerController extends TsaBaseController {
 		// 답변의뢰업체
 		mav.addObject("supplyCompList", rendererService.getSupplyCompanyList(TsaSession.getInfo().getSupplyCompCd(), "N"));
 
-		// 문의상세
-		mav.addObject("counsel", counselService.getOneToOneQna(counselSq));
+		// 상품문의 상세
+		mav.addObject("counselInfo", counselService.getGoodsQna(counselSq));
 
 		// 상품문의용 답변문구
 		mav.addObject("ansPhaseList", rendererService.getAnswerPhaseList("20"));

+ 3 - 2
style24.admin/src/main/java/com/style24/persistence/mybatis/shop/TsaCounsel.xml

@@ -104,9 +104,10 @@
 	<update id="updateQnaAnswer" parameterType="Counsel">
 		/* TsaCounsel.updateQnaAnswer */
 		UPDATE TB_COUNSEL
-		SET    ANS_TITLE = #{ansTitle}
+		SET    EMAIL_SEND_YN = EMAIL_REQ_YN /*이메일답변수신 값에 따라 이메일을 먼저 발송함으로 이메일답변수신 값과 동일하게 처리*/
+		     , ANS_TITLE = #{ansTitle}
 		     , ANS_CONTENT = #{ansContent}
-		     , ANS_STAT = 'G060_20' --답변완료
+		     , ANS_STAT = 'G060_20' /*답변완료*/
 		     , ANS_NO = #{ansNo}
 		     , ANS_DT = NOW()
 		     , UPD_NO = #{updNo}

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

@@ -27,13 +27,14 @@
 		<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}"/>
 				
 				<h4>상담정보</h4>
 				<table class="tableStyle" aria-describedby="상담정보">
 					<colgroup>
 						<col style="width:10%;"/>
 						<col style="width:10%;"/>
-						<col style="width:12%;"/>
+						<col style="width:10%;"/>
 						<col style="width:15%;"/>
 						<col/>
 						<col style="width:15%;"/>
@@ -54,7 +55,7 @@
 						<tr>
 							<td th:text="*{counselSq}"></td>
 							<td th:text="*{siteNm}"></td>
-							<td th:utext="*{counselClsfNm}"></td>
+							<td>상품문의</td>
 							<td th:text="*{questDt}"></td>
 							<td th:utext="*{custNm + ' / ' + cellPhnno + ' / ' + email}"></td>
 							<td th:utext="*{ansTransYn == 'Y' ? ansTransDt + ' / ' + ansCompNm : ''}"></td>
@@ -66,20 +67,33 @@
 				<h4>고객문의</h4>
 				<table class="frmStyle" aria-describedby="고객문의">
 					<colgroup>
+						<col style="width:10%;"/>
+						<col style="width:20%;"/>
 						<col style="width:10%;"/>
 						<col/>
+						<col style="width:10%;"/>
+						<col style="width:30%;"/>
 					</colgroup>
 					<tbody>
 						<tr>
-							<th>상품</th>
-							<td>
-								<p th:text="*{goodsNm + ' (' + relGoodsCd + ')'}"></p>
-								<p class="userImg" id="onetooneImg"></p>
-							</td>
+							<th>상품코드</th>
+							<td colspan="3" th:text="*{relGoodsCd}"></td>
+							<th rowspan="3">상품이미지</th>
+							<td rowspan="3" class="userImg" id="onetooneImg"></td>
+						</tr>
+						<tr>
+							<th>상품명</th>
+							<td colspan="3" th:text="*{goodsNm}"></td>
+						</tr>
+						<tr>
+							<th>비밀글여부</th>
+							<td th:text="*{secretYn == 'Y' ? 'Yes' : 'No'}"></td>
+							<th>이메일답변요청</th>
+							<td th:text="*{emailReqYn == 'Y' ? '수신' : '미수신'}"></td>
 						</tr>
 						<tr>
 							<th>문의 내용</th>
-							<td>
+							<td colspan="5">
 								<textarea class="textareaR4" style="resize: none;" name="questContent" th:text="*{questContent}" disabled="disabled"></textarea>
 							</td>
 						</tr>
@@ -128,7 +142,7 @@
 		<ul class="panelBar">
 			<li class="right">
 				<!-- 아직 업체에게 의뢰를 하지 않은 답변대기중인 입점상품이면서 권한이 "SUPER관리자, 어드민관리자, CS관리자, CS상담사"일 때 -->
-				<span th:if="${counsel.selfGoodsYn == 'N' && counsel.ansTransYn == 'N' && counsel.ansStat == '10' (sessionInfo.roleCd == 'G001_0000' || sessionInfo.roleCd == 'G001_A000' || sessionInfo.roleCd == 'G001_A3000' || sessionInfo.roleCd == 'G001_A301')}">
+				<span th:if="${counselInfo.selfGoodsYn == 'N' && counselInfo.ansTransYn == 'N' && counselInfo.ansStat == 'G060_10' && (sessionInfo.roleCd == 'G001_0000' || sessionInfo.roleCd == 'G001_A000' || sessionInfo.roleCd == 'G001_A3000' || sessionInfo.roleCd == 'G001_A301')}">
 					<select name="ansCompCd" id="ansCompCd">
 						<option value="">[답변의뢰업체]</option>
 						<option th:if="${supplyCompList}" th:each="oneData, status : ${supplyCompList}" th:value="${oneData.cd}" th:text="${oneData.cdNm}"></option>
@@ -217,8 +231,8 @@
 	$(document).ready(function() {
 // 		var counsel = [[${counsel}]];
 
-// 		if (!gagajf.isNull(counsel.sysFileNm)) {
-// 			var imgTag = '<img style="height: 100px;" onclick="cfnOpenImagePreViewPopup(\'goodsImgView\', \'' + _imgUrl + '/counsel/' + counsel.sysFileNm + '\')" src="' + _imgUrl + '/counsel/' + counsel.sysFileNm + '">';
+// 		if (!gagajf.isNull(counselInfo.sysFileNm)) {
+// 			var imgTag = '<img style="height: 100px;" onclick="cfnOpenImagePreViewPopup(\'goodsImgView\', \'' + _imgUrl + '/counsel/' + counselInfo.sysFileNm + '\')" src="' + _imgUrl + '/counsel/' + counselInfo.sysFileNm + '">';
 // 			$('#onetooneImg').append(imgTag);
 // 		}
 

+ 1 - 0
style24.admin/src/main/webapp/WEB-INF/views/customer/GoodsQnaForm.html

@@ -130,6 +130,7 @@
 			headerName: "상품코드", field: "relGoodsCd", width: 100, cellClass: 'text-center',
 			cellRenderer: function(params) { return '<a href="javascript:void(0);">' + params.value + '</a>'; }
 		},
+		{headerName: "상품명", field: "goodsNm", width: 300},
 		{
 			headerName: "비밀글여부", field: "secretYn", width: 100, cellClass: 'text-center',
 			cellRenderer: function(params) { return params.value == 'Y' ? 'Yes' : 'No'; }

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

@@ -27,6 +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}"/>
 				
 				<h4>상담정보</h4>
 				<table class="tableStyle" aria-describedby="상담정보">
@@ -72,12 +73,14 @@
 						<col style="width:10%;"/>
 						<col style="width:50%;"/>
 						<col style="width:10%;"/>
-						<col style="width:30%;"/>
+						<col/>
 					</colgroup>
 					<tbody>
 						<tr>
 							<th>문의 제목</th>
-							<td colspan="3" th:text="*{questTitle}"></td>
+							<td th:text="*{questTitle}"></td>
+							<th>이메일답변요청</th>
+							<td th:text="*{emailReqYn == 'Y' ? '수신' : '미수신'}"></td>
 						</tr>
 						<tr>
 							<th>문의 내용</th>
@@ -184,8 +187,8 @@
 	$(document).ready(function() {
 // 		var counsel = [[${counsel}]];
 
-// 		if (!gagajf.isNull(counsel.sysFileNm)) {
-// 			var imgTag = '<img style="height: 100px;" onclick="cfnOpenImagePreViewPopup(\'goodsImgView\', \'' + _imgUrl + '/counsel/' + counsel.sysFileNm + '\')" src="' + _imgUrl + '/counsel/' + counsel.sysFileNm + '">';
+// 		if (!gagajf.isNull(counselInfo.sysFileNm)) {
+// 			var imgTag = '<img style="height: 100px;" onclick="cfnOpenImagePreViewPopup(\'goodsImgView\', \'' + _imgUrl + '/counsel/' + counselInfo.sysFileNm + '\')" src="' + _imgUrl + '/counsel/' + counselInfo.sysFileNm + '">';
 // 			$('#onetooneImg').append(imgTag);
 // 		}