Browse Source

Merge remote-tracking branch 'origin/develop' into xodud1202

xodud lee 5 years ago
parent
commit
32a5b6b277

+ 1 - 1
src/main/java/com/style24/front/biz/dao/TsfGiftcardDao.java

@@ -49,7 +49,7 @@ public interface TsfGiftcardDao {
 	 * @author sowon
 	 * @since 2021. 3. 15
 	 */	
-	 void getGiftcardUseConfirm(GiftCard giftcard);
+	 void createGiftcardUseConfirm(GiftCard giftcard);
 	 
 	 /**
 	 * 상품권 api 저장

+ 2 - 2
src/main/java/com/style24/front/biz/service/TsfGiftcardService.java

@@ -84,7 +84,7 @@ public class TsfGiftcardService {
 	 * @throws Exception
 	 * @since 2021. 3. 15
 	 */
-	public void getGiftcardUseConfirm(GiftCard giftcard) throws Exception {
+	public void createGiftcardUseConfirm(GiftCard giftcard) throws Exception {
 		// 고객번호 설정
 		int custNo = TsfSession.getInfo().getCustNo();
 		String ip = TsfSession.getIpAddress();
@@ -132,7 +132,7 @@ public class TsfGiftcardService {
 			giftcard.setRmGfcdAmt(Integer.parseInt(param[1])); // 승인금액
 			giftcard.setUseStDate(param2[0]);
 			giftcard.setUseExpDate(param3[0]);
-			giftcardDao.getGiftcardUseConfirm(giftcard);
+			giftcardDao.createGiftcardUseConfirm(giftcard);
 			
 			int custGfcdSq = giftcardDao.getCustGiftCardSq(pubNo);
 			giftcard.setCustGfcdSq(custGfcdSq);

+ 2 - 2
src/main/java/com/style24/front/biz/web/TsfMypageController.java

@@ -1508,8 +1508,8 @@ public class TsfMypageController extends TsfBaseController {
 	 */
 	@PostMapping("/gift/use/confirm")
 	@ResponseBody
-	public GagaResponse getGiftcardUseConfirm(@RequestBody GiftCard giftcard) throws Exception {
-		giftcardService.getGiftcardUseConfirm(giftcard);
+	public GagaResponse createGiftcardUseConfirm(@RequestBody GiftCard giftcard) throws Exception {
+		giftcardService.createGiftcardUseConfirm(giftcard);
 		return super.ok(message.getMessage("SUCC_0001"));
 	}
 

+ 1 - 0
src/main/java/com/style24/persistence/domain/Review.java

@@ -53,6 +53,7 @@ public class Review extends TscBaseDomain {
 	private String frontGb;
 	private String custGb;
 	private String brandNm;
+	private int attachSq;
 
 	private String custId;			// 고객ID
 	private String sysImgNm;		// 상품대표이미지

+ 2 - 2
src/main/java/com/style24/persistence/mybatis/shop/TsfGiftcard.xml

@@ -102,8 +102,8 @@
 	     )
 	</insert>
 	
-	<insert id="getGiftcardUseConfirm" parameterType="GiftCard">
-		/*TsfGiftcard.getGiftcardUseConfirm*/
+	<insert id="createGiftcardUseConfirm" parameterType="GiftCard">
+		/*TsfGiftcard.createGiftcardUseConfirm*/
 		INSERT INTO TB_CUST_GIFTCARD
 		(
 			CUST_NO

+ 6 - 2
src/main/webapp/WEB-INF/views/web/goods/GoodsDetailReviewFormWeb.html

@@ -553,9 +553,13 @@
 						fileGbClass = '';
 						if (reviewAttach.fileGb == "M") fileGbClass = "mov";
 				tag += '				<li>\n';
-				tag += '					<a href="javascript:void();" onclick="cfGoodsReviewDetail(\''+item.goodsCd+'\',\'\', \'Y\',\''+item.reviewSq+'\');">\n';
+				tag += '					<a href="javascript:void();" onclick="cfGoodsReviewDetail(\''+item.goodsCd+'\',\'\', \'Y\',\''+item.reviewSq+'\','+aIdx+');">\n';
 				tag += '						<div class="pic">\n';
-				tag += '							<span class="thumb '+ fileGbClass +'" style="background-image:url('+ _imgUrl + reviewAttach.sysFileNm +');"></span>\n'; //<!-- 동영상의 썸네일일 경우 mov 클래스 추가 -->
+					if (reviewAttach.fileGb == "M") {
+				tag +='					<span class="thumb '+fileGbClass+'"><iframe width="100%" height="100%" src="'+_kollusMediaUrl +'/'+reviewAttach.kmcKey +'?player_version=html5" frameborder="0" allowfullscreen webkitallowfullscreen mozallowfullscreen></iframe></span>\n';
+					}else{
+				tag +='					<span class="thumb" style="background-image:url('+ _imgUrl + reviewAttach.sysFileNm +');\" >\n';
+					}
 				tag += '						</div>\n';
 				tag += '					</a>\n';
 				tag += '				</li>\n';		

+ 9 - 4
src/main/webapp/WEB-INF/views/web/goods/GoodsReviewDetailFormWeb.html

@@ -34,6 +34,7 @@
 <input type="hidden" name="bestYn" th:value="${review.bestYn}" />
 <input type="hidden" name="photoYn" th:value="${review.photoYn}" />
 <input type="hidden" name="reviewSq" th:value="${review.reviewSq}" />
+<input type="hidden" name="attachSq" th:value="${review.attachSq}" />
 </form>
 <a href="javascript:void(0);" rel="modal:close" onclick="cfCloseLayer('layer_review_best')" class="close-modal">Close</a> 
 <script th:inline="javascript">
@@ -55,6 +56,7 @@
 		// 목록
 		if (result.reviewList != null && result.reviewList.length > 0) {
 			let fileGbClass = '';
+			let rdx = $('#reviewDetailForm input[name=attachSq]').val();
 			$.each(result.reviewList, function(idx, review) {
 				let tag = '';
 				tag +='<div class="pop_cont">\n';
@@ -185,19 +187,21 @@
 				tag +='	<div class="thumblist">\n';
 				tag +='		<ul>\n';
 					let activeClass = '';
+					
 					$.each(review.reviewAttachList, function(aIdx, reviewAttach){
 						activeClass = '';
-						if (aIdx == 0){
+						if (aIdx == rdx){
 							activeClass = 'active';
 						}
 						fileGbClass = '';
 						if (reviewAttach.fileGb == "M") fileGbClass = "mov";
 				tag +='			<li>\n';
 				tag +='				<div class="pic '+activeClass+'"> \n'; <!-- 활성화시 active 클래스 추가 -->
-				tag +='					<span class="thumb" class="'+fileGbClass+'" style="background-image:url('+ _imgUrl + reviewAttach.sysFileNm +');\" >\n';<!-- 동영상의 썸네일일 경우 mov 클래스 추가 -->
+				
 					if (reviewAttach.fileGb == "M") {
-				tag +='					<iframe width="100%" height="100%" src="'+_kollusMediaUrl +'/'+reviewAttach.kmcKey +'?player_version=html5" frameborder="0" allowfullscreen webkitallowfullscreen mozallowfullscreen></iframe>\n';
+				tag +='					<span class="thumb '+fileGbClass+'"><iframe width="100%" height="100%" src="'+_kollusMediaUrl +'/'+reviewAttach.kmcKey +'?player_version=html5" frameborder="0" allowfullscreen webkitallowfullscreen mozallowfullscreen></iframe></span>\n';
 					}else{
+				tag +='					<span class="thumb" style="background-image:url('+ _imgUrl + reviewAttach.sysFileNm +');\" >\n';
 				tag +='					<img src="'+ _imgUrl + reviewAttach.sysFileNm +'" alt="">\n';	
 					}
 				tag +='					</span>\n';
@@ -238,7 +242,8 @@
 				        $this.find('.thumblist ul').attr('style', 'width:' + thumbListWidth + 'px;');
 				        
 				    });
-
+				
+				$('.pd_photoreviewdetail_pop .thumblist ul li').eq(rdx).trigger("click");
 			});
 		}
 		

+ 3 - 2
src/main/webapp/ux/style24_link.js

@@ -641,10 +641,10 @@ function cfGoodsInstockAlarmInfo(goodsCd, colorCd) {
 * @access : public
 * @desc   : 상품평- 베스트 리뷰 보기
 * <pre>
-*		cfGoodsReviewDetail(goodsCd, bestYn, photoYn, reviewSq);
+*		cfGoodsReviewDetail(goodsCd, bestYn, photoYn, reviewSq, attachSq);
 * </pre>
 */
-function cfGoodsReviewDetail(goodsCd, bestYn, photoYn, reviewSq) {
+function cfGoodsReviewDetail(goodsCd, bestYn, photoYn, reviewSq, attachSq) {
 	var str = '<div class="modal fade pd_pop pd_photoreviewdetail_pop" id="layer_review_best" tabindex="-1" role="dialog" aria-labelledby="pdBestReviewLabel" aria-hidden="true"></div>';
 	if ("P" != _frontGb){
 		str = '<div class="modal pop_full fade pd_pop pd_photoreviewdetail_pop" id="layer_review_best" tabindex="-1" role="dialog" aria-labelledby="exampleFullLabel" aria-hidden="true"></div>';
@@ -658,6 +658,7 @@ function cfGoodsReviewDetail(goodsCd, bestYn, photoYn, reviewSq) {
 	params += '&reviewSq=' + reviewSq;
 	params += '&bestYn=' + bestYn;
 	params += '&photoYn=' + photoYn;
+	if (typeof (attachSq) != 'undefined') params += "&attachSq=" + attachSq;
 	
 	cfOpenLayer(_PAGE_GOODS_REVIEW_DETAIL_LAYER+params, 'layer_review_best');
 }