浏览代码

테스트 수정

eskim 5 年之前
父节点
当前提交
e0599faedf

+ 26 - 5
src/main/java/com/style24/front/biz/web/TsfGoodsController.java

@@ -190,23 +190,29 @@ public class TsfGoodsController extends TsfBaseController {
 			mav.addObject("goodsDealComposeList", goodsDealComposeList);
 
 			Collection<Coupon> goodsCouponList = new ArrayList<Coupon>();
+			ArrayList<String> arrGoodsList = new ArrayList<>();
 			// 상품쿠폰
 			if (goodsDealComposeList != null && !goodsDealComposeList.isEmpty()) {
-
-				ArrayList<String> arrGoodsList = new ArrayList<>();
 				for (Goods goodsCompose : goodsDealComposeList) {
-
 					arrGoodsList.add(goodsCompose.getCompsGoodsCd());
 				}
 
 				String[] arrGoodsCd = arrGoodsList.stream().toArray(String[]::new);
 
 				paramsGoods.setArrGoodsCd(arrGoodsCd);
-				paramsGoods.setMaxRownum(1);
-				goodsCouponList = couponService.getGoodsCouponList(paramsGoods);
 			}
+			paramsGoods.setMaxRownum(1);
+			goodsCouponList = couponService.getGoodsCouponList(paramsGoods);
 			mav.addObject("goodsCouponList", goodsCouponList);
+			
+			// 다다익선
+			paramsGoods.setMaxRownum(1);
+			mav.addObject("tmtbList", goodsService.getTmtbList(paramsGoods));
 
+			// 사은품
+			paramsGoods.setMaxRownum(1);
+			mav.addObject("freeGoodsList", goodsService.getFreeGoodsList(paramsGoods));
+			
 			// 딜용 상품평건수
 			Review review = new Review();
 			review.setGoodsCd(goods.getGoodsCd());
@@ -590,6 +596,21 @@ public class TsfGoodsController extends TsfBaseController {
 		setGoods(paramsGoods);
 		Goods goods = goodsService.getGoodsInfo(paramsGoods);
 
+		if (TscConstants.GoodsType.DEAL.value().equals(goods.getGoodsType())) {	// 딜상품
+			Collection<Goods> goodsDealComposeList = goodsService.getGoodsDealComposeList(paramsGoods);
+			Collection<Coupon> goodsCouponList = new ArrayList<Coupon>();
+			ArrayList<String> arrGoodsList = new ArrayList<>();
+			// 상품쿠폰
+			if (goodsDealComposeList != null && !goodsDealComposeList.isEmpty()) {
+				for (Goods goodsCompose : goodsDealComposeList) {
+					arrGoodsList.add(goodsCompose.getCompsGoodsCd());
+				}
+
+				String[] arrGoodsCd = arrGoodsList.stream().toArray(String[]::new);
+
+				paramsGoods.setArrGoodsCd(arrGoodsCd);
+			}
+			}
 		// 쿠폰정보
 		paramsGoods.setMaxRownum(1);
 		mav.addObject("goodsCouponList", couponService.getGoodsCouponList(paramsGoods));

+ 23 - 3
src/main/java/com/style24/persistence/mybatis/shop/TsfGoods.xml

@@ -1031,13 +1031,33 @@
 		                               AND C.TMTB_SECTION_SQ  = D.TMTB_SECTION_SQ  
 		                               AND D.DEL_YN  = 'N'
 		      INNER JOIN TB_TMTB_APPLY_GOODS B ON A.TMTB_SQ = B.TMTB_SQ
+		                                       <choose>
+		                                           <when test="arrGoodsCd != null and arrGoodsCd != ''">
+		                                       AND B.GOODS_CD IN
+		                                           <foreach collection="arrGoodsCd" item="item" index="index"  open="(" close=")" separator=",">
+		                                           UPPER(#{item})
+		                                           </foreach>
+		                                           </when>
+		                                           <otherwise>
 		                                       AND B.GOODS_CD =  #{goodsCd}
+		                                           </otherwise>
+		                                       </choose>
 		                                       AND B.DEL_YN = 'N'
 		                                       AND B.GOODS_GB IN ( 'G800_10', 'G800_20')  -- 기본과 적용상품
 		      LEFT OUTER JOIN TB_TMTB_APPLY_GOODS E ON A.TMTB_SQ = E.TMTB_SQ
-		                                       AND E.GOODS_CD = #{goodsCd}
-		                                       AND E.DEL_YN = 'N'
-		                                       AND E.GOODS_GB = 'G800_30'  -- 제외상품 
+		                                            <choose>
+		                                                <when test="arrGoodsCd != null and arrGoodsCd != ''">
+		                                            AND E.GOODS_CD IN
+		                                                <foreach collection="arrGoodsCd" item="item" index="index"  open="(" close=")" separator=",">
+		                                                UPPER(#{item})
+		                                                </foreach>
+		                                                </when>
+		                                                <otherwise>
+		                                            AND E.GOODS_CD =  #{goodsCd}
+		                                                </otherwise>
+		                                            </choose>
+		                                            AND E.DEL_YN = 'N'
+		                                            AND E.GOODS_GB = 'G800_30'  -- 제외상품 
 		      WHERE NOW() BETWEEN A.TMTB_ST_DT AND A.TMTB_ED_DT
 		      AND A.TMTB_STAT ='G232_11'  -- 진행중
 		      AND A.DEL_YN = 'N'

+ 27 - 15
src/main/webapp/WEB-INF/views/web/goods/GoodsDealDetailFormWeb.html

@@ -119,22 +119,30 @@
 																(goodsCouponList != null and !goodsCouponList.empty)
 															}" >
 								<dl>
-									<div class="bnf_shopping" th:if="${goodsCouponList != null and !goodsCouponList.empty}">
+									<div class="bnf_shopping" th:if="${(goodsCouponList != null and !goodsCouponList.empty) or
+																		(tmtbList != null and !tmtbList.empty) or
+																		(freeGoodsList != null and !freeGoodsList.empty)}" >
 										<dt>쇼핑혜택</dt>
-										<!------------ 색상 강조 텍스트 영역 <em class="c_primary"></em> 사용요청 ------------>
-										<dd>
-											<span th:if="${goodsCouponList != null and !goodsCouponList.empty}">
-											<th:block th:each="goodsCoupon, status : ${goodsCouponList}" th:if="${status.first}">
-											최대 <em class="c_primary" >
-												<th:block th:if="${goodsCoupon.dcWay == 'G240_10'}" th:text="|${#numbers.formatInteger(goodsCoupon.dcVal, 0,'COMMA')}원|"></th:block>
-												<th:block th:unless="${goodsCoupon.dcWay == 'G240_10'}" th:text="|${goodsCoupon.dcVal}%|"></th:block>
-											</em> 쿠폰 할인
-											</th:block>
-											</span> 
-											<span><em class="c_primary">99개</em> 이상 구매 시 <em class="c_primary">9,999,999원</em> 할인</span>
-											<span>미니언즈 우산 증정</span>
-											<button type="button" id="btn_bnfShopping_pop" class="btn_popup" th:onclick="cfGoodsShopBenefitInfo([[${goodsInfo.goodsCd}]])"><span>자세히</span></button>
-										</dd>
+											<dd>
+												<span th:if="${goodsCouponList != null and !goodsCouponList.empty}">
+												<th:block th:each="goodsCoupon, status : ${goodsCouponList}" th:if="${status.first}">
+												최대 <em class="c_primary" >
+													<th:block th:if="${goodsCoupon.dcWay == 'G240_10'}" th:text="|${#numbers.formatInteger(goodsCoupon.dcVal, 0,'COMMA')}원|"></th:block>
+													<th:block th:unless="${goodsCoupon.dcWay == 'G240_10'}" th:text="|${goodsCoupon.dcVal}%|"></th:block>
+												</em> 쿠폰 할인
+												</th:block>
+												</span> 
+												<span th:if="${tmtbList != null and !tmtbList.empty}">
+												<th:block th:each="tmtb, status : ${tmtbList}" th:if="${status.first}">
+												<em class="c_primary"><th:block th:text="${#numbers.formatInteger(tmtb.sectionVal, 0,'COMMA')}"></th:block><th:block th:text="${(tmtb.sectionGb == 'G810_10')? '개':'금액'}"></th:block></em> 이상 구매 시 
+												<em class="c_primary"><th:block th:text="${#numbers.formatInteger(tmtb.dcVal, 0,'COMMA')}"></th:block><th:block th:text="${(tmtb.dcWay == 'G240_10')? '원':'%'}"></th:block></em></em> 할인
+												</th:block>
+												</span>
+												<span th:if="${freeGoodsList != null and !freeGoodsList.empty}">
+												<th:block th:each="freeGoods, status : ${freeGoodsList}" th:if="${status.first}">
+												<th:block th:text="${freeGoods.goodsNm}"></th:block> 증정 <th:block th:if="${freeGoods.allYn == 'N'}" th:text="외 택1"></th:block></span>
+												<button type="button" id="btn_bnfShopping_pop" class="btn_popup" th:onclick="cfGoodsShopBenefitInfo([[${goodsInfo.goodsCd}]])"><span>자세히</span></button>
+											</dd>
 									</div>
 									<div class="bnf_card" th:if="${cardInfoList != null and !cardInfoList.empty}">
 										<dt>카드혜택</dt>
@@ -748,6 +756,10 @@
 		$('.price_box .number  span').html(totalEa.addComma());
 		$('.price_box .price > span').html(totalPrice.addComma());
 		
+		if ($('input[name="cea"]', document.cartForm).length <= 0 ) {
+			$('.price_box').hide();
+		}
+		
 	}
 	
 	//장바구니담기

+ 3 - 2
src/main/webapp/WEB-INF/views/web/goods/GoodsDetailFormWeb.html

@@ -46,6 +46,7 @@
 												</th:block>
 												<th:block th:unless="${goodsVideo.videoGb == 'Y'}">
 												<iframe width="100%" height="100%" th:src="${kollusMediaUrl+'/'+goodsVideo.kmcKey +'?player_version=html5'}" frameborder="0" allowfullscreen webkitallowfullscreen mozallowfullscreen></iframe>
+												
 												</th:block>
 												</span>
 											</a>
@@ -75,10 +76,10 @@
 								<li th:id="${'navLocate'+ status.count}"  th:classappend="${status.first}? 'on' : ''">
 									<div class="movbox">
 										<th:block th:if="${goodsVideo.videoGb == 'Y'}">
-										<iframe width="100%" height="100%" th:src="${'https://www.youtube.com/embed/'+goodsVideo.kmcKey+'?rel=0&autoplay=1&mute=1'}" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
+										<iframe id="prodctThumbVideo" class="pd_mov" width="100%" height="100%" th:src="${'https://www.youtube.com/embed/'+goodsVideo.kmcKey+'?rel=0&autoplay=1&mute=1'}" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
 										</th:block>
 										<th:block th:unless="${goodsVideo.videoGb == 'Y'}">
-										<iframe width="100%" height="100%" th:src="${kollusMediaUrl+'/'+goodsVideo.kmcKey +'?player_version=html5'}" frameborder="0" allowfullscreen webkitallowfullscreen mozallowfullscreen></iframe>
+										<iframe id="prodctThumbVideo" class="pd_mov" width="100%" height="100%" th:src="${kollusMediaUrl+'/'+goodsVideo.kmcKey +'?enable_initialize_focus=false&autoplay&mute&controls_activation=none'}" frameborder="0" allowfullscreen></iframe>
 										</th:block>
 									</div>
 								</li>

+ 0 - 4
src/main/webapp/WEB-INF/views/web/goods/GoodsDetailReviewFormWeb.html

@@ -303,10 +303,6 @@
 								<span class="thumb" th:classAppend="${(reviewAttach.fileGb == 'M') ? 'mov' :''}" th:style="${'background-image:url('+imgUrl+ reviewAttach.sysFileNm+');'}"></span><!-- 동영상의 썸네일일 경우 mov 클래스 추가 -->
 								</th:block>
 							</div>
-							<div class="pic" th:unless="${bestReview.reviewAttachList != null and !bestReview.reviewAttachList.empty}">
-								<span class="thumb" th:style="${'background-image:url('+imgGoodsUrl+ '/'+goodsInfo.sysImgNm+'?RS=162);'}">
-								</span>
-							</div>
 							<div class="star_score" th:with="starScore=${#numbers.formatDecimal((bestReview.iscore*100/5), 0,0)}">
 								<span class="star">
 									<em class="progbar" th:style="${'width:'+starScore+'%;' }"></em> <!-- 평점 style로 표기 -->

+ 1 - 1
src/main/webapp/WEB-INF/views/web/goods/GoodsIncludeFormWeb.html

@@ -401,7 +401,7 @@
 													<img alt="" class="vLHTC pd_img" th:src="${imgGoodsUrl+'/'+goodsInfo.sysImgNm+'?RS=80'}" th:onerror="'this.src=\''+@{${uxImgUrl}+ '/images/pc/thumb/bg_item_none.png'}+'\';'">
 												</div>
 												<p class="itemBrand" th:text="${goodsInfo.brandGroupNm}">NBA 키즈</p>
-												<div class="itemName" th:text="${goodsInfo.goodsFullNm}">유니 삼단블록 플리스 집업 유니 삼단블록 플리스 집업 유니 삼단블록 플리스 집업</div>
+												<div class="itemName" ><span class="tit_option" th:text="${'[상품'+status.count+']'}">[상품1]</span><th:block th:text="${goodsInfo.goodsFullNm}"></th:block></div>
 												<p class="itemPrice"><th:block th:text="${#numbers.formatInteger(goodsInfo.currPrice, 0,'COMMA')}"> 134,100</th:block>
 													<span class="itemPrice_original" th:if="${goodsInfo.listPrice > goodsInfo.currPrice}" th:text="${#numbers.formatInteger(goodsInfo.listPrice, 0,'COMMA')}">149,000</span>
 													<span class="itemPercent" th:if="${goodsInfo.dcRate > 0}" th:text="|${#numbers.formatDecimal(goodsInfo.dcRate,0,0)}%|">30%</span>

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

@@ -66,7 +66,7 @@
 				if (review.reviewAttachList != null && review.reviewAttachList.length > 0){
 					reviewClass = '';
 				}
-				tag +='<div class="review" class="'+reviewClass+'" >\n';  <!-- 첨부이미지 없을 시 empty_photo 클래스 추가 --> 
+				tag +='<div class="review '+reviewClass+'" >\n';  <!-- 첨부이미지 없을 시 empty_photo 클래스 추가 --> 
 				tag +='	<div class="pic">\n';
 				if (review.reviewAttachList != null && review.reviewAttachList.length > 0){
 					$.each(review.reviewAttachList, function(aIdx, reviewAttach){

+ 1 - 1
src/main/webapp/ux/pc/css/layout.css

@@ -2789,7 +2789,7 @@ ul.maintabs li [class^='box_depth'] {display:none; position:absolute; left:100%;
 	.option_box [class^="opt_"] .select_custom .select:after {right:20px;}
 	.option_box [class^="opt_"] div[class*="item_set_"] .select .opt_price {display:none;}
 	.option_box .opt_select div[class*="item_set_"] .select .opt_price {display:none;}
-	.option_box [class^="opt_"] .select_custom .select .opt_price {padding-top: 10px;}
+	.option_box [class^="opt_"] .select_custom .select .opt_price {padding-top: 10px;display: none;}
 	.option_box [class^="opt_"] .select_custom[aria-disabled="true"] .select {color:#bbb; background:#f5f5f5;}
 	.option_box [class^="opt_"] .select_custom .combo .list {top:52px; padding:0}
 	.option_box [class^="opt_"] .select_custom .combo .list > li {padding:18px 18px; line-height:1; color:#666; font-size:16px; font-weight:200;}

+ 31 - 6
src/main/webapp/ux/pc/js/common-ui.js

@@ -79,6 +79,9 @@ $(document).ready(function() {
 		$("#fileAdd").on("change", function(e) {
 			var files = e.target.files,
 				filesLength = files.length;
+				console.log(filesLength);
+			var cmtLa = $('.cmt .cmt_thumb .form_field .imgUpload label');
+			var cmtIn = $('.cmt .cmt_thumb .form_field .imgUpload input');
 			for (var i = 0; i < filesLength; i++) {
 				var f = files[i]
 				var fileReader = new FileReader();
@@ -90,9 +93,24 @@ $(document).ready(function() {
 						"</span>").insertAfter("#fileAdd");
 					$(".removes").click(function(){
 						$(this).parent(".pics").remove();
+						cmtLa.css('display', 'block');
+						cmtIn.css('display', 'block');
+						$('#fileAdd').removeAttr("disabled");
 					});
 				});
 			fileReader.readAsDataURL(f);
+				var maxFileLength = 10; /* 최대 파일 갯수를 입력해 주세요 */
+				var imgFiles=$('.imgUpload .pics');
+				var cmtLa = $('.cmt .cmt_thumb .form_field .imgUpload label');
+				var cmtIn = $('.cmt .cmt_thumb .form_field .imgUpload input');
+				if (imgFiles.length >= maxFileLength-1) {
+					mcxDialog.alert('이미지는 최대' + maxFileLength +'장 까지 첨부 가능합니다.'); //210420_수정 : 시스템 alert -> dialog 변경.
+					$('#fileAdd').attr("disabled",true);
+					cmtLa.css('display', 'none');
+					cmtIn.css('display', 'none');
+				} else if(imgFiles.length < maxFileLength){
+					$('#fileAdd').removeAttr("disabled");
+				}
 			}
 		});
 	} else {
@@ -323,23 +341,30 @@ $(document).ready( function() {
 	});
 
 	/* 고객센터_accordion */
-	$(document).off('click').on('click','.cs .foldGroup .fold_head',function(e){
-		$('.cs .foldGroup .fold_head').removeClass('on');
-        $('.cs .foldGroup .fold_cont').slideUp(100);
-		$(this).parents('.foldGroup li').find('.fold_cont').slideToggle(100);
+	/* 210428_수정 : 아코디언 */
+	$(document).on('click','.cs .foldGroup .fold_head',function(){
 		$(this).toggleClass('on');
-		return false;
+		$(this).siblings('.fold_cont').slideToggle(100);
+		$(this).parents('li').siblings('li').find('.fold_head').removeClass('on');
+		$(this).parents('li').siblings('li').find('.fold_cont').slideUp(100);
 	});
+	/* //210428_수정 : 아코디언 */
 
 	/* 주문결제_accordion */
+	/* 210428_수정 : 아코디언 */
 	$(document).on('click','.od .foldGroup .fold_head .fold_tit',function(e){	
-		$(this).parents('.foldGroup li').find('.fold_cont').slideToggle(100);
+		//$(this).parents('.foldGroup li').find('.fold_cont').slideToggle(100);
+		//$(this).parents('.fold_head').toggleClass('on');
 		$(this).parents('.fold_head').toggleClass('on');
+		$(this).parents('.foldGroup li').find('.fold_cont').slideToggle(100);
+		$(this).parents('li').siblings('li').find('.fold_head').removeClass('on');
+		$(this).parents('li').siblings('li').find('.fold_cont').slideUp(100);
 		return false;
 	}).on('click','.od .foldGroup .fold_paymethod .fold_head .fold_tit',function(e){
 		$("#rdi-paymethod-quick").trigger("click");
 		return false;
 	});
+	/* //210428_수정 : 아코디언 */
 	
 	/* 아이디/비밀번호 찾기_accordion:open */
 	$(document).on('click','.mb .foldGroup.checkcase .fold_head',function(e){