Просмотр исходного кода

Merge branch 'sowon' into develop

sowon4187 5 лет назад
Родитель
Сommit
73fc91e257

+ 9 - 0
src/main/java/com/style24/front/biz/dao/TsfCounselDao.java

@@ -85,6 +85,15 @@ public interface TsfCounselDao {
 	 */
 	int deleteOneToOneQnaImage(Counsel counsel);
 
+	/**
+	 * 1:1문의 사진 리스트
+	 * @param counsel -상담정보
+	 * @return
+	 * @author sowon
+	 * @since 2021. 06. 214
+	 */
+	Collection<Counsel> getOneToOneImgList(Counsel counsel);
+	
 	/**
 	 * 상품문의 생성
 	 * @param counsel - 상담정보

+ 11 - 0
src/main/java/com/style24/front/biz/service/TsfCounselService.java

@@ -200,6 +200,17 @@ public class TsfCounselService {
 			throw new IllegalStateException("답변이 완료되지 않아 삭제할 수 없습니다.");
 		}
 	}
+	
+	/**
+	 * 1:1문의 사진 리스트
+	 * @param counsel -상담정보
+	 * @return
+	 * @author sowon
+	 * @since 2021. 06. 214
+	 */
+	public Collection<Counsel> getOneToOneImgList(Counsel counsel){
+		return counselDao.getOneToOneImgList(counsel);
+	}
 
 	/**
 	 * 상품문의 생성

+ 18 - 0
src/main/java/com/style24/front/biz/web/TsfCallcenterController.java

@@ -23,6 +23,7 @@ import com.style24.persistence.TscPageRequest;
 import com.style24.persistence.domain.Counsel;
 import com.style24.persistence.domain.Faq;
 import com.style24.persistence.domain.Notice;
+import com.style24.persistence.domain.Plan;
 
 import lombok.extern.slf4j.Slf4j;
 
@@ -325,6 +326,23 @@ public class TsfCallcenterController extends TsfBaseController {
 		counselService.deleteOneToOneQnaImage(counsel);
 		return super.ok(message.getMessage("SUCC_0003"));
 	}
+	
+	/**
+	 * 1:1 문의 이미지상세 -  댓글 상세 레이어
+	 * @return
+	 * @author sowon
+	 * @since 2021. 6. 14
+	 */
+	@PostMapping("/onetoone/photo/detail/layer")
+	public ModelAndView onetoonePhotoDetailForm(Counsel counsel) {
+		ModelAndView mav = new ModelAndView();
+
+		// 상품 기본정보
+		mav.addObject("counsel",counsel);
+		mav.addObject("imgList", counselService.getOneToOneImgList(counsel));
+		mav.setViewName(super.getDeviceViewName("callcenter/OneToOnePhotoForm"));
+		return mav;
+	}
 
 	/**
 	 * 상품문의 등록 처리

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

@@ -54,6 +54,8 @@ public class Counsel extends TscBaseDomain {
 	private String secretYn;		// 비밀글여부(상품문의에서만 사용)
 	private String delYn;			// 삭제여부
 	private int selfGb;				// 내문의 1: , 그외 0
+	private String sysFileNm;		// 이미지 공통 변수
+	private int rnum;
 	
 	private String goodsType; 		// 상품타입
 

+ 18 - 0
src/main/java/com/style24/persistence/mybatis/shop/TsfCounsel.xml

@@ -199,6 +199,24 @@
 		AND    ANS_STAT = 'G060_20' /*답변상태:답변완료*/
 	</update>
 	
+	<select id="getOneToOneImgList" parameterType="Counsel"  resultType="Counsel">
+		/* TsfCounsel.getOneToOnePhotoList */
+		SELECT  Z.*
+		      , ROW_NUMBER() OVER() AS RNUM
+		FROM
+		(
+		   SELECT  SYS_FILE_NM1 AS SYS_FILE_NM
+		         , COUNSEL_SQ 
+		   FROM  TB_COUNSEL TC 
+		   WHERE COUNSEL_SQ = #{counselSq}
+		   UNION 
+		   SELECT SYS_FILE_NM2 AS SYS_FILE_NM
+		         , COUNSEL_SQ
+		   FROM TB_COUNSEL TC 
+		   WHERE COUNSEL_SQ = #{counselSq}
+		)Z     
+	</select>
+	
 	<!-- 상품문의 생성 -->
 	<insert id="createGoodsQna" parameterType="Counsel">
 		/* TsfCounsel.createGoodsQna */

+ 91 - 0
src/main/webapp/WEB-INF/views/web/callcenter/OneToOnePhotoFormWeb.html

@@ -0,0 +1,91 @@
+<!DOCTYPE html>
+<html lang="ko" xmlns:th="http://www.thymeleaf.org">
+<!--
+ *******************************************************************************
+ * @source  : GoodsReviewPhotoFormMob.html
+ * @desc	: 상품평 - 포토/영상 리스트 팝업
+ *============================================================================
+ * STYLE24
+ * Copyright(C) 2020 TSIT, All rights reserved.
+ *============================================================================
+ * VER  DATE		 AUTHOR	  DESCRIPTION
+ * ===  ===========  ==========  =============================================
+ * 1.0  2021.04.008   eskim		최초 작성
+ *******************************************************************************
+ -->
+<!-- 댓글 이미지 팝업 -->
+<!-- <div class="modal fade thumb_img_pop" id="thumbImgPop" tabindex="-1" role="dialog" aria-labelledby="thumbImgLabel" aria-hidden="true"> -->
+        <div class="modal-dialog" role="document">
+            <div class="modal-content" th:with="frontUrl=${@environment.getProperty('domain.front')}, imgView=${@environment.getProperty('upload.image.view')}">
+				<div class="modal-header sr-only">
+                    <h5 class="modal-title" id="thumbImgLabel">이미지 상세보기</h5>
+                </div>
+                <div class="modal-body">
+                    <div class="pop_cont">
+ 						<div class="swiper-container">
+							<div class="swiper-wrapper">
+								<!-- 이미지 슬라이드 영역 -->
+							<th:block th:each="a, stat : ${imgList}">
+								<div class="swiper-slide">
+									<div class="pop_img" th:style="${'background-image:url('+imgView+'/'+a.sysFileNm+');'}">
+									</div>
+								</div>
+							</th:block>
+							</div>
+						</div>
+						<div class="swiper-button-next"></div>
+						<div class="swiper-button-prev"></div>						
+						<div class="swiper-pagination"></div>
+                    </div>
+                </div>
+            </div>
+        </div>        
+<!--     </div> -->
+	<!-- //댓글 이미지 팝업 -->	
+<a href="javascript:void(0);" rel="modal:close"	onclick="cfCloseLayer('layer_review_photo')" class="close-modal">Close</a>
+<script th:inline="javascript">
+
+
+
+$(document).ready( function() {
+	let attchSq = 0; 
+	let img = [[${imgList[1].sysFileNm}]];
+	if (!gagajf.isNull( [[${counsel.rnum}]])){
+		attchSq = [[${counsel.rnum}]]-1;
+	} 
+	
+	if (!gagajf.isNull(img)) {
+		var contactPopSwiper = new Swiper('.thumb_img_pop .swiper-container', {
+			navigation: {
+				nextEl: '.thumb_img_pop .swiper-button-next',
+				prevEl: '.thumb_img_pop .swiper-button-prev',
+			},
+			pagination: {
+				el: '.thumb_img_pop .swiper-pagination',
+				clickable: true,
+			},
+					
+			observer:true,
+			observeParents: true,
+		});		
+		
+		contactPopSwiper.slideTo(attchSq, 0, false);
+		contactPopSwiper.update();
+	}
+	else{
+		$(".swiper-pagination").append('<span class="swiper-pagination-bullet swiper-pagination-bullet-active" tabindex="0" role="button" aria-label="Go to slide 1"></span>');
+		$(".swiper-pagination").addClass("swiper-pagination-clickable swiper-pagination-bullets");
+		$(".swiper-button-next").addClass("swiper-button-disabled");
+		$(".swiper-button-prev").addClass("swiper-button-disabled");
+		
+	}
+	
+	
+
+
+});
+/*<![CDATA[*/
+	
+/*]]>*/
+</script>
+</html>

+ 2 - 2
src/main/webapp/WEB-INF/views/web/callcenter/OneToOneQnaFormWeb.html

@@ -208,13 +208,13 @@
 					
 					if (!gagajf.isNull(item.sysFileNm1)) {
 						tag += '					<span class="thumb_pic">\n';
-						tag += '						<img src="' + _uploadImageUrl + '/' + item.sysFileNm1 + '" alt="" onerror="this.src=\'/images/pc/thumb/bg_item_none.png\'">\n';
+						tag += '						<img src="' + _uploadImageUrl + '/' + item.sysFileNm1 + '" alt="" onerror="this.src=\'/images/pc/thumb/bg_item_none.png\'" onclick="cfOneToPhotoDetail(\''+item.counselSq+'\', \'1\');">\n';
 						tag += '					</span>\n';
 					}
 					
 					if (!gagajf.isNull(item.sysFileNm2)) {
 						tag += '					<span class="thumb_pic">\n';
-						tag += '						<img src="' + _uploadImageUrl + '/' + item.sysFileNm2 + '" alt="" onerror="this.src=\'/images/pc/thumb/bg_item_none.png\'">\n';
+						tag += '						<img src="' + _uploadImageUrl + '/' + item.sysFileNm2 + '" alt="" onerror="this.src=\'/images/pc/thumb/bg_item_none.png\'" onclick="cfOneToPhotoDetail(\''+item.counselSq+'\', \'2\');">\n';
 						tag += '					</span>\n';
 					}
 					

+ 3 - 3
src/main/webapp/WEB-INF/views/web/planning/PlanningReplyPhotoFormWeb.html

@@ -2,15 +2,15 @@
 <html lang="ko" xmlns:th="http://www.thymeleaf.org">
 <!--
  *******************************************************************************
- * @source  : GoodsReviewPhotoFormMob.html
- * @desc	: 상품평 - 포토/영상 리스트 팝업
+ * @source  : PlanningReplyPhotoFormWeb.html
+ * @desc	: 기획전 댓글 - 포토 리스트 팝업
  *============================================================================
  * STYLE24
  * Copyright(C) 2020 TSIT, All rights reserved.
  *============================================================================
  * VER  DATE		 AUTHOR	  DESCRIPTION
  * ===  ===========  ==========  =============================================
- * 1.0  2021.04.008   eskim		최초 작성
+ * 1.0  2021.04.08   sowon		최초 작성
  *******************************************************************************
  -->
 <!-- 댓글 이미지 팝업 -->

+ 22 - 0
src/main/webapp/ux/style24_link.js

@@ -115,6 +115,7 @@ const _PAGE_CUSTOMER_GRADE_BENEFIT = _frontUrl + "/planning/event/custgrade/bene
 const _PAGE_FAQ = _frontUrl + "/callcenter/faq/form";									// 고객센터 > FAQ
 const _PAGE_ONETOONE_QNA = _frontUrl + "/callcenter/onetoone/qna/form";					// 고객센터 > 1:1문의
 const _PAGE_ONETOONE_QNA_REG = _frontUrl + "/callcenter/onetoone/qna/register/form";	// 고객센터 > 1:1문의등록
+const _PAGE_ONETOONE_QNA_DETAIL_LAYER = _frontUrl + "/callcenter/onetoone/photo/detail/layer";	// 고객센터 > 1:1 상세(포토)
 const _PAGE_GOODS_QNA = _frontUrl + "/callcenter/goods/qna/form";						// 고객센터 > 상품문의
 const _PAGE_NOTICE = _frontUrl + "/callcenter/notice/form";								// 고객센터 > 공지사항
 
@@ -710,6 +711,27 @@ function cfMoPlanReplyDetail(planSq, planEntrySq, planEntryAtSq, attachSq) {
 	cfnOpenLayer(_PAGE_PLANNING_REPLY_DETAIL_LAYER+params, 'thumbImgPop');
 }
 
+/**
+* @type   : function
+* @access : public
+* @desc   : 댓글 이미지 팝업(웹) - 1:1 문의
+* <pre>
+*		cfOneToPhotoDetail(counselSq, attachSq);
+* </pre>
+*/
+function cfOneToPhotoDetail(counselSq, rnum) {
+	var str = '<div class="modal fade thumb_img_pop" id="thumbImgPop" tabindex="-1" role="dialog" aria-labelledby="thumbImgLabel" aria-hidden="true"></div>';
+
+	if ($('#thumbImgPop').length == 0) {
+		$('body').append(str);
+	}
+	
+	var params = '?counselSq=' + counselSq;
+	if (typeof (rnum) != 'undefined') params += "&rnum=" + rnum;
+	
+	cfnOpenLayer(_PAGE_ONETOONE_QNA_DETAIL_LAYER + params, 'thumbImgPop');
+}
+
 /**
  * @type   : function
  * @access : public