Selaa lähdekoodia

Merge branch 'develop' into bin2107

bin2107 5 vuotta sitten
vanhempi
commit
1381a85984

+ 35 - 0
src/main/java/com/style24/admin/biz/dao/TsaReviewDao.java

@@ -4,6 +4,7 @@ import java.util.Collection;
 
 import com.style24.core.support.annotation.ShopDs;
 import com.style24.persistence.domain.Review;
+import com.style24.persistence.domain.ReviewAttach;
 
 /**
  * 상품평 Dao
@@ -23,4 +24,38 @@ public interface TsaReviewDao {
 	 */
 	Collection<Review> getReviewList(Review review);
 
+	/**
+	 * 상품평 정보
+	 * @param reviewSq - 상품평일련번호
+	 * @return
+	 * @author gagamel
+	 * @since 2021. 4. 22
+	 */
+	Review getReview(Integer reviewSq);
+
+	/**
+	 * 상품평 첨부파일 목록
+	 * @param reviewSq - 상품평일련번호
+	 * @return
+	 * @author gagamel
+	 * @since 2021. 4. 22
+	 */
+	Collection<ReviewAttach> getReviewAttachList(Integer reviewSq);
+
+	/**
+	 * 상품평 관리자 답변 저장
+	 * @param review - 상품평 정보
+	 * @author gagamel
+	 * @since 2021. 4. 22
+	 */
+	void saveReviewUserReply(Review review);
+
+	/**
+	 * 상품평 첨부파일 삭제(=미노출) 처리
+	 * @param reviewAttach - 상품평첨부파일 정보
+	 * @author gagamel
+	 * @since 2021. 4. 22
+	 */
+	void deleteReviewAttach(ReviewAttach reviewAttach);
+
 }

+ 41 - 0
src/main/java/com/style24/admin/biz/service/TsaReviewService.java

@@ -4,10 +4,12 @@ import java.util.Collection;
 
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
 
 import com.style24.admin.biz.dao.TsaReviewDao;
 import com.style24.core.support.message.TscMessageByLocale;
 import com.style24.persistence.domain.Review;
+import com.style24.persistence.domain.ReviewAttach;
 
 import lombok.extern.slf4j.Slf4j;
 
@@ -38,4 +40,43 @@ public class TsaReviewService {
 		return reviewDao.getReviewList(review);
 	}
 
+	/**
+	 * 상품평 상세
+	 * @param reviewSq - 상품평일련번호
+	 * @return
+	 * @author gagamel
+	 * @since 2021. 4. 22
+	 */
+	public Review getReview(Integer reviewSq) {
+		// 상품평 정보
+		Review review = reviewDao.getReview(reviewSq);
+
+		// 상품평 첨부파일
+		review.setAttachList(reviewDao.getReviewAttachList(reviewSq));
+
+		return review;
+	}
+
+	/**
+	 * 상품평 관리자 답변 저장
+	 * @param review - 상품평 정보
+	 * @author gagamel
+	 * @since 2021. 4. 22
+	 */
+	@Transactional("shopTxnManager")
+	public void saveReviewUserReply(Review review) {
+		reviewDao.saveReviewUserReply(review);
+	}
+
+	/**
+	 * 상품평 첨부파일 삭제(=미노출) 처리
+	 * @param rvAtcSq - 상품평첨부파일일련번호
+	 * @author gagamel
+	 * @since 2021. 4. 22
+	 */
+	@Transactional("shopTxnManager")
+	public void deleteReviewAttach(ReviewAttach reviewAttach) {
+		reviewDao.deleteReviewAttach(reviewAttach);
+	}
+
 }

Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 233 - 165
src/main/java/com/style24/admin/biz/web/TsaMarketingController.java


+ 5 - 1
src/main/java/com/style24/persistence/mybatis/shop/TsaCustomer.xml

@@ -362,7 +362,7 @@
 		       TAB2 E
 		ON     CC.CUST_CPN_SQ = E.CPN_SQ
 		WHERE  CC.CUST_NO = #{custNo}
-		ORDER BY E.ORD_NO DESC, CC.REG_DT DESC
+		ORDER BY CC.REG_DT DESC
 	</select>
 
 	<select id="getCustomerPoint" parameterType="Integer" resultType="Point">
@@ -468,6 +468,7 @@
 		       TB_CUSTOMER C
 		ON     CGH.CUST_NO = C.CUST_NO
 		WHERE  CGH.CUST_NO = #{custNo}
+		ORDER BY CGH.REG_DT DESC
 	</select>
 
 	<!--회원 상품평내역  -->
@@ -560,6 +561,7 @@
 		ON    CS.CUST_NO = C.CUST_NO
 		WHERE CS.COUNSEL_TYPE = 'C'
 		AND   CS.CUST_NO = #{custNo}
+		ORDER BY CS.REG_DT DESC
 	</select>
 
 	<!--회원 상품문의 내역  -->
@@ -607,6 +609,7 @@
 		ON    CS.CUST_NO = C.CUST_NO
 		WHERE CS.COUNSEL_TYPE = 'G'
 		AND   CS.CUST_NO = #{custNo}
+		ORDER BY CS.REG_DT DESC
 	</select>
 
 	<!--회원등급 변경내역  -->
@@ -625,6 +628,7 @@
 		       TB_CUSTOMER C
 		ON     CGH.CUST_NO = C.CUST_NO
 		WHERE  CGH.CUST_NO = #{custNo}
+		ORDER BY CGH.REG_DT DESC
 	</select>
 
 	<!-- 회원접촉내역 -->

+ 85 - 1
src/main/java/com/style24/persistence/mybatis/shop/TsaReview.xml

@@ -39,7 +39,7 @@
 		     , FN_GET_USER_NM(R.CONFIRM_UNO)            AS CONFIRM_UNM    /*확인자명*/
 		     , DATE_FORMAT(R.CONFIRM_DT,'%Y%m%d%H%i%S') AS CONFIRM_DT     /*확인일시*/ 
 		     , R.ADM_RPL                                                  /*관리자댓글*/
-		     , FN_GET_USER_NM(R.ADM_RPL_REG_NO)         AS ADM_RPL_GRE_NM /*관리자댓글작성자명*/
+		     , FN_GET_USER_NM(R.ADM_RPL_REG_NO)         AS ADM_RPL_REG_NM /*관리자댓글작성자명*/
 		     , DATE_FORMAT(R.ADM_RPL_DT,'%Y%m%d%H%i%S') AS ADM_RPL_DT     /*관리자댓글작성일시*/
 		FROM   TB_REVIEW R
 		     , TB_CUSTOMER C
@@ -79,4 +79,88 @@
 		ORDER  BY R.REG_DT DESC
 	</select>
 	
+	<!--상품평 정보 -->
+	<select id="getReview" parameterType="String" resultType="Review">
+		/* TsaReview.getReview */
+		SELECT R.REVIEW_SQ                                                /*상품평일련번호*/
+		     , R.GOODS_CD                                                 /*상품코드*/
+		     , G.GOODS_NM                                                 /*상품명*/
+		     , (SELECT SYS_IMG_NM
+		        FROM   TB_GOODS_IMG
+		        WHERE  GOODS_CD = G.GOODS_CD
+		        AND    COLOR_CD = G.MAIN_COLOR_CD
+		        AND    DEFAULT_IMG_YN = 'Y' /*디폴트이미지*/
+		        LIMIT 1
+		       )                                        AS GOODS_IMG      /*상품이미지*/
+		     , R.REVIEW_GB                                                /*상품평구분*/
+		     , R.CUST_NO                                                  /*고객번호*/
+		     , C.CUST_NM                                                  /*고객명*/
+		     , R.ORD_NO                                                   /*주문번호*/
+		     , R.ORD_DTL_NO                                               /*주문상세번호*/
+		     , R.REVIEW_TITLE                                             /*상품평제목*/
+		     , R.REVIEW_CONTENT                                           /*상품평내용*/
+		     , R.SCORE                                                    /*구매평점*/
+		     , R.HEIGHT                                                   /*키*/
+		     , R.WEIGHT                                                   /*몸무게*/
+		     , FN_GET_CODE('G040',R.SCORE_SIZE)         AS SCORE_SIZE     /*사이즈점수*/
+		     , FN_GET_CODE('G039',R.SCORE_COLOR)        AS SCORE_COLOR    /*컬러점수*/
+		     , FN_GET_CODE('G042',R.SCORE_FIT)          AS SCORE_FIT      /*핏점수*/
+		     , FN_GET_CODE('G079',R.SCORE_THICK)        AS SCORE_THICK    /*두께감점수*/
+		     , FN_GET_CODE('G080',R.SCORE_WEIGHT)       AS SCORE_WEIGHT   /*무게감점수*/
+		     , FN_GET_CODE('G041',R.SCORE_BALL)         AS SCORE_BALL     /*볼넓이점수*/
+		     , R.GIVE_DUE_PNT                                             /*지급예정포인트*/
+		     , FN_GET_CODE('G043',R.PNT_GIVE_STAT)      AS PNT_GIVE_STAT  /*포인트지급상태*/
+		     , R.CONFIRM_YN                                               /*확인여부*/
+		     , FN_GET_USER_NM(R.CONFIRM_UNO)            AS CONFIRM_UNM    /*확인자명*/
+		     , DATE_FORMAT(R.CONFIRM_DT,'%Y%m%d%H%i%S') AS CONFIRM_DT     /*확인일시*/ 
+		     , R.ADM_RPL                                                  /*관리자댓글*/
+		     , FN_GET_USER_NM(R.ADM_RPL_REG_NO)         AS ADM_RPL_REG_NM /*관리자댓글작성자명*/
+		     , DATE_FORMAT(R.ADM_RPL_DT,'%Y%m%d%H%i%S') AS ADM_RPL_DT     /*관리자댓글작성일시*/
+		     , R.RPL_CFM_YN                                               /*댓글확인여부*/
+		     , DATE_FORMAT(R.RPL_CFM_DT,'%Y%m%d%H%i%S') AS RPL_CFM_DT     /*댓글확인일시*/
+		FROM   TB_REVIEW R
+		     , TB_CUSTOMER C
+		     , TB_GOODS G
+		WHERE  R.REVIEW_SQ = #{reviewSq}
+	</select>
+	
+	<!--상품평 첨부파일 목록 -->
+	<select id="getReviewAttachList" parameterType="String" resultType="ReviewAttach">
+		/* TsaReview.getReviewAttachList */
+		SELECT RV_ATC_SQ   /*상품평첨부파일일련번호*/
+		     , REVIEW_SQ   /*상품평일련번호*/
+		     , FILE_GB     /*파일구분(M:동영상, I:이미지)*/
+		     , ORG_FILE_NM /*원본파일명*/
+		     , SYS_FILE_NM /*시스템파일명*/
+		     , KUF_KEY     /*KOLLUS업로드파일키*/
+		     , KMC_KEY     /*KOLLUS미디어컨텐츠키*/
+		FROM   TB_REVIEW_ATTACH
+		WHERE  REVIEW_SQ = #{reviewSq}
+		AND    DEL_YN = 'N' /*삭제안된넘*/
+	</select>
+	
+	<!-- 상품평 미노출 처리 -->
+	<update id="saveReviewUserReply" parameterType="Review">
+		/* TsaReview.saveReviewUserReply */
+		UPDATE TB_REVIEW
+		SET    ADM_RPL = #{admRpl}
+		     , ADM_RPL_REG_NO = #{admRplRegNo}
+		     , ADM_RPL_DT = NOW()
+		     , UPD_NO = #{updNo}
+		     , UPD_DT = NOW()
+		WHERE  REVIEW_SQ = #{reviewSq}
+		AND    RPL_CFM_YN = 'N' /*고객이 관리자댓글 확인을 안한넘*/
+	</update>
+	
+	<!-- 상품평 미노출 처리 -->
+	<update id="deleteReviewAttach" parameterType="ReviewAttach">
+		/* TsaReview.deleteReviewAttach */
+		UPDATE TB_REVIEW_ATTACH
+		SET    DEL_YN = 'Y'
+		     , UPD_NO = #{updNo}
+		     , UPD_DT = NOW()
+		WHERE  RV_ATC_SQ = #{rvAtcSq}
+		AND    DEL_YN = 'N' /*삭제안된넘*/
+	</update>
+	
 </mapper>

+ 2 - 2
src/main/webapp/WEB-INF/views/customer/CustomerDetailForm.html

@@ -767,9 +767,9 @@
 	const columnReviewDefs = [
 		{headerName: "상품코드", field: "goodsCd", width: 100, cellClass: 'text-center'},
 		{
-			headerName: "제목", field: "reviewTitle", width: 300, cellClass: 'text-center',
+			headerName: "내용", field: "reviewContent", width: 300, cellClass: 'text-center',
 			cellRenderer: function (params) {
-				return '<a href="javascript:void(0);">' + params.value + '</a>';
+				return !gagajf.isNull(params.value) ? '<a href="javascript:void(0);">' + params.value + '</a>' : '';
 			}
 		},
 		{headerName: "만족도", field: "score", width: 100, cellClass: 'text-center'},

+ 194 - 0
src/main/webapp/WEB-INF/views/marketing/ReviewDetailForm.html

@@ -0,0 +1,194 @@
+<!DOCTYPE html>
+<html lang="ko"
+	xmlns:th="http://www.thymeleaf.org">
+<!--
+ *******************************************************************************
+ * @source  : ReviewDetailForm.html
+ * @desc    : 리뷰 상세 팝업 Page
+ *============================================================================
+ * STYLE24
+ * Copyright(C) 2020 TSIT, All rights reserved.
+ *============================================================================
+ * VER  DATE         AUTHOR      DESCRIPTION
+ * ===  ===========  ==========  =============================================
+ * 1.0  2021.04.22   gagamel     최초 작성
+ *******************************************************************************
+ -->
+<div class="modalPopup" data-width="1200" id="popupReviewDetail">
+	<div class="panelStyle">
+		<!-- TITLE -->
+		<div class="panelTitle">
+			<strong>리뷰 상세</strong>
+			<button type="button" class="close" onclick="uifnPopupClose('popupReviewDetail');"><em class="fa fa-times"></em></button>
+		</div>
+		<!-- //TITLE -->
+		
+		<!-- CONTENT -->
+		<div class="panelContent">
+			<form id="reviewDetailForm" name="reviewDetailForm" action="#" th:action="@{'/marketing/review/save'}" th:method="post" th:object="${reviewInfo}">
+				<input type="hidden" name="reviewSq" th:value="*{reviewSq}"/>
+				
+				<h4>리뷰 정보</h4>
+				<table class="tableStyle" aria-describedby="상담정보">
+					<colgroup>
+						<col style="width:10%;"/>
+						<col style="width:10%;"/>
+						<col style="width:12%;"/>
+						<col style="width:15%;"/>
+						<col/>
+<!-- 						<col style="width:10%;"/> -->
+<!-- 						<col style="width:15%;"/> -->
+						<col style="width:25%;"/>
+					</colgroup>
+					<thead>
+						<tr>
+							<th>상담일련번호</th>
+							<th>사이트</th>
+							<th>상담분류</th>
+							<th>문의일시</th>
+							<th>고객정보</th>
+<!-- 							<th>주문번호</th> -->
+<!-- 							<th>답변의뢰</th> -->
+							<th>답변상태</th>
+						</tr>
+					</thead>
+					<tbody>
+						<tr>
+							<td th:text="*{counselSq}"></td>
+							<td th:text="*{siteNm}"></td>
+							<td th:utext="*{counselClsfNm}"></td>
+							<td th:text="*{questDt}"></td>
+							<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 == 'G060_20' ? ansStatNm + ' / ' + ansDt + ' / ' + ansNm : ansStatNm}"></td>
+						</tr>
+					</tbody>
+				</table>
+				
+				<h4>고객문의</h4>
+				<table class="frmStyle" aria-describedby="고객문의">
+					<colgroup>
+						<col style="width:10%;"/>
+						<col style="width:50%;"/>
+						<col style="width:10%;"/>
+						<col/>
+					</colgroup>
+					<tbody>
+						<tr>
+							<th>문의 제목</th>
+							<td th:text="*{questTitle}"></td>
+							<th>SMS답변요청</th>
+							<td th:text="*{smsReqYn == 'Y' ? '수신' : '미수신'}"></td>
+						</tr>
+						<tr>
+							<th>문의 내용</th>
+							<td>
+								<textarea class="textareaR4" style="resize: none;" name="questContent" th:text="*{questContent}" disabled="disabled"></textarea>
+							</td>
+							<th>첨부 이미지</th>
+							<td class="userImg">
+								<img th:if="${counselInfo.sysFileNm1 != null}" style="height: 100px;" th:src="${@environment.getProperty('domain.image') + '/counsel/' + counselInfo.sysFileNm1}" alt="" onerror='this.src="/image/no.gif"'/>
+								<img th:if="${counselInfo.sysFileNm2 != null}" style="height: 100px;" th:src="${@environment.getProperty('domain.image') + '/counsel/' + counselInfo.sysFileNm2}" alt="" onerror='this.src="/image/no.gif"'/>
+							</td>
+						</tr>
+					</tbody>
+				</table>
+				
+				<h4>답변등록</h4>
+				<table class="frmStyle" aria-describedby="답변등록">
+					<colgroup>
+						<col style="width:10%;"/>
+						<col style="width:90%;"/>
+					</colgroup>
+					<tbody>
+						<tr>
+							<th>답변 템플릿</th>
+							<td>
+								<select name="ansSq">
+									<option value="">[선택]</option>
+									<option th:if="${ansPhaseList}" th:each="oneData, statue : ${ansPhaseList}" th:value="${oneData.cd}" th:text="${oneData.cdNm}"></option>
+								</select>
+							</td>
+						</tr>
+						<tr>
+							<th>답변 제목<i class="required" title="필수" aria-hidden="true"></i></th>
+							<td>
+								<input type="text" class="" name="ansTitle" th:value="*{ansTitle}" required="required" data-valid-name="답변 제목"/>
+							</td>
+						</tr>
+						<tr>
+							<th>
+								답변 내용<i class="required" title="필수" aria-hidden="true"></i>
+								<br/>
+								<span id="dpLocAnsContent">0</span>/4,000Byte
+							</th>
+							<td>
+								<textarea class="textareaR4" style="resize: none;" name="ansContent" th:text="*{ansContent}" onkeyup="cfnGetTextLength(this, 4000, $('#dpLocAnsContent'));" required="required" data-valid-name="답변 내용"></textarea>
+							</td>
+						</tr>
+					</tbody>
+				</table>
+			</form>
+		</div>
+		<!-- //CONTENT -->
+
+		<!-- 버튼 배치 영역 -->
+		<ul class="panelBar">
+			<li class="right">
+				<button type="button" class="btn btn-info btn-lg" id="btnSaveAnswer" th:if="${counselInfo.ansStat == 'G060_10'}">답변저장</button>
+			</li>
+		</ul>
+		<!-- //버튼 배치 영역 -->
+	</div>
+</div>
+
+<script th:inline="javascript">
+/*<![CDATA[*/
+	// 답변 저장
+	$('#btnSaveAnswer').on('click', function() {
+		// 입력 값 체크
+		if (!gagajf.validation('#reviewDetailForm'))
+			return false;
+		
+		mcxDialog.confirm("저장하시겠습니까?", {
+			cancelBtnText: "취소",
+			sureBtnText: "확인",
+			sureBtnClick: function() {
+				gagajf.ajaxFormSubmit($('#reviewDetailForm').prop('action'), '#reviewDetailForm', function() {
+					uifnPopupClose('popupOneToOneQnaDetail');
+					$('#btnSearch').trigger('click');
+				});
+			}
+		});
+	});
+	
+	// 답변템플릿 선택 시
+	$('select[name=ansSq]').on('change', function() {
+		var ansSq = $(this).val();
+
+		if (!gagajf.isNull(ansSq)) {
+			var actionUrl = '/customer/qna/answerphase/' + ansSq + '/20';
+			$.get(actionUrl
+				, function(data) {
+					if (!gagajf.isNull(data.ansSq)) {
+						$('input[name=ansTitle]').val(data.ansTitle);
+						$('textarea[name=ansContent]').val(data.ansContent);
+						cfnGetTextLength($('textarea[name=ansContent]'), 4000, $('#dpLocAnsContent'));
+					}
+				});
+		} else {
+			// 답변 내용 초기화
+			$('input[name=ansTitle]').val('');
+			$('textarea[name=ansContent]').val('');
+			cfnGetTextLength($('textarea[name=ansContent]'), 4000, $('#dpLocAnsContent'));
+		}
+	});
+	
+	$(document).ready(function() {
+		cfnGetTextLength($('textarea[name=ansContent]'), 4000, $('#dpLocAnsContent'));
+	});
+/*]]>*/
+</script>
+
+</html>

BIN
src/main/webapp/image/ico_play.png


BIN
src/main/webapp/image/star_empty.png


+ 23 - 0
src/main/webapp/ux/css/admin.ui.css

@@ -878,6 +878,29 @@ table.mtz-monthpicker {border:1px solid #ddd; border-top:none;}
 #pictureOffset .pos{position:absolute;width:0px;height:0px;}
 #pictureOffset .pos i{overflow:hidden;position:absolute;left:0;top:0;transform:translate(-50%,-50%);width:40px;height:40px;line-height:1;color:#fff;font-size:20px;text-align:center;background-color:#fd4802;border-radius:100%;box-sizing:border-box;padding-top:10px;}
 
+/* 고객 리뷰 */ /* 210420 */
+.reviewWrap{padding:10px 20px;}
+.reviewWrap .user_review .star_score {overflow: hidden;display:inline-block;position:relative;width:95px;height:14px;}
+.reviewWrap .user_review .star_score .star {position:absolute; top:0; width:100%; height:100%; background:#ccc;}
+.reviewWrap .user_review .star_score .star::after {content:''; position:absolute;top:0;left:0;z-index:2;width:100%; height:100%; background:url('../../image/star_empty.png') no-repeat 0 0; background-size:100% 100%; image-rendering:pixelated;}
+.reviewWrap .user_review .star_score .star .progbar {position:absolute;top:0;left:0;height:100%;background:#fd4802;}
+.reviewWrap .user_review .star_score .score {color:#222; font-size:16px; font-weight:200; line-height:1;}
+.reviewWrap .user_review .star_score .score em {font-weight:500;}
+.reviewWrap .user_review dl{padding-bottom:20px;}
+.reviewWrap .user_review dl::after{content:'';display:block;clear:both;}
+.reviewWrap .user_review dl dt{float:left;color:#888;}
+.reviewWrap .user_review dl dd{float:left;margin:0 50px 0 15px; color: #fd4802;}
+.reviewWrap .user_review dl .pic{float:left;position:relative; width:103px;height:103px;margin-right:10px;}
+.reviewWrap .user_review dl .pic:last-child{margin-right:0;}
+.reviewWrap .user_review dl .pic i{display:block;position:relative;padding-top:100%;height:0;background-repeat:no-repeat;background-position:50% 50%;background-size:cover;text-indent:-9999px;}
+.reviewWrap .user_review dl .pic.mov::after {content:'';position: absolute;left: 0;top: 0;z-index: 2;width: 100%;height: 100%;background: rgba(0,0,0,0.3) url('../../image/ico_play.png') no-repeat 50% 50%;}
+.reviewWrap .user_review .rvTxt{overflow-y:auto;margin-bottom:35px;line-height:2;word-break:keep-all;background-color:#fcfcfc;}
+.reviewWrap .user_review .date{float:right;}
+.reviewWrap .user_review .date dl{padding-bottom:unset}
+.reviewWrap .user_review .date dd{color:unset;margin-right:unset;}
+.reviewWrap .admDate{font-weight:normal;color:#777}
+
+
 
 /* 반응형:GNB 유저명,등급,로그아웃 --------------- */
 @media ( max-width:1370px ) {

Kaikkia tiedostoja ei voida näyttää, sillä liian monta tiedostoa muuttui tässä diffissä