Bladeren bron

기획전 상세 2열전시 완료

sowon4187 5 jaren geleden
bovenliggende
commit
44dcb4e71e

+ 10 - 0
src/main/java/com/style24/front/biz/dao/TsfPlanningDao.java

@@ -130,6 +130,16 @@ public interface TsfPlanningDao {
 	 */
 	Collection<Plan> getPlanImageInfo(Plan plan);
 	
+	/**
+	 * 기획전 템플릿 상품 1열
+	 *
+	 * @param 기획전 번호
+	 * @return
+	 * @author sowon
+	 * @date 2021. 3. 23
+	 */
+	Collection<Plan> getPlanGoods1Info(Plan plan);
+	
 	/**
 	 * 이벤트 갯수 조회
 	 * 

+ 13 - 0
src/main/java/com/style24/front/biz/service/TsfPlanningService.java

@@ -155,6 +155,7 @@ public class TsfPlanningService {
 	 * @since 2021. 3. 22
 	 */
 	public Collection<Plan> getPlanCouponInfo(Coupon coupon) {
+		coupon.setCustNo(TsfSession.getInfo().getCustNo());
 		return planningDao.getPlanCouponInfo(coupon);
 	}
 	
@@ -169,6 +170,18 @@ public class TsfPlanningService {
 	public Collection<Plan> getPlanImageInfo(Plan plan) {
 		return planningDao.getPlanImageInfo(plan);
 	}
+	
+	/**
+	 * 기획전 템플릿 상품1열
+	 *
+	 * @param
+	 * @return
+	 * @author sowon
+	 * @since 2021. 3. 22
+	 */
+	public Collection<Plan> getPlanGoods1Info(Plan plan) {
+		return planningDao.getPlanGoods1Info(plan);
+	}
 
 
 	/**

+ 15 - 0
src/main/java/com/style24/front/biz/web/TsfPlanningController.java

@@ -107,6 +107,7 @@ public class TsfPlanningController extends TsfBaseController {
 	@GetMapping("/detail/form")
 	@ResponseBody
 	public ModelAndView PlanningDetailForm(@RequestParam(value="planSq") int planSq) throws Exception {
+		
 		ModelAndView mav = new ModelAndView();
 		Plan plan = new Plan();
 		Review review = new Review();
@@ -116,6 +117,8 @@ public class TsfPlanningController extends TsfBaseController {
 		plan.setPlanSq(planSq);
 		review.setPlanSq(planSq);
 		coupon.setPlanSq(planSq);
+		
+		planningService.accessCustGrade(plan);
 		// 이거 access로 옮겨야 하나..?
 		//plan.setSiteCd(TscConstants.Site.STYLE24.value());
 		plan.setFrontGb(TsfSession.getFrontGb());
@@ -145,6 +148,18 @@ public class TsfPlanningController extends TsfBaseController {
 		// 이미지
 		mav.addObject("imageInfo",planningService.getPlanImageInfo(plan));
 		
+		// 상품1열 전시
+		plan.setTmplType("G082_50");
+		mav.addObject("goods1Info",planningService.getPlanGoods1Info(plan));
+		
+		// 상품2열 전시
+		plan.setTmplType("G082_51");
+		mav.addObject("goods2Info",planningService.getPlanGoods1Info(plan));
+		
+		//상품4열 전시
+		plan.setTmplType("G082_52");
+		mav.addObject("goods4Info",planningService.getPlanGoods1Info(plan));
+				
 		// 다른기획전 보기 
 		mav.addObject("planList", planningService.getPlanList(plan));
 //

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

@@ -235,6 +235,7 @@ public class Plan extends TscBaseDomain{
 		private String brand;				// 기획전 리스트 (브랜드 명 외)
 		private String newPlan;				// 기획전 new 확인
 		private int cnt;					// 기획전 브랜드 카운트;
+		private String brandKnm;
 		
 		private String sysImgNm;			// 상품 이미지
 		// Pagination

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

@@ -79,6 +79,7 @@ public class Review extends TscBaseDomain {
 	private String title;			// 기획전 타이틀
 	private String goodsNm;			// 상품이름
 	private int currPrice;		// 현재가
+	private String fileGb;			// 첨부파일 종류
 	// Masking
 	public String getMaskingCustId() {
 		return (this.custId != null) ?  MaskingUtils.id(this.custId) : this.custId;

+ 55 - 3
src/main/java/com/style24/persistence/mybatis/shop/TsfPlanning.xml

@@ -322,12 +322,11 @@
 	
 	<select id="templateDispOrdInfo" parameterType="Plan" resultType="Plan">
 		/* TsfPlanning.templateDispOrdInfo*/
-		SELECT TMPL_TYPE , DISP_ORD 
+		SELECT TMPL_TYPE , DISP_ORD, PLAN_CONT_SQ,TITLE ,LINK_URL ,DISP_YN 
 		FROM TB_PLAN_CONTENTS TPC 
 		WHERE 1=1 
 			AND TPC.PLAN_SQ = #{planSq}
 		    AND TPC.DISP_YN = 'Y'
-		GROUP BY TMPL_TYPE
 		ORDER BY DISP_ORD 
 	</select>
 	
@@ -390,6 +389,7 @@
 					 ,F.SUPPLY_GOODS_CD
 					 ,F.PNT_PRATE
 					 ,F.PNT_MRATE
+					 ,F.FILE_GB
 				  ,(SELECT MAX(SYS_IMG_NM) FROM TB_GOODS_IMG  WHERE GOODS_CD =F.GOODS_CD AND COLOR_CD = F.MAIN_COLOR_CD AND DEFAULT_IMG_YN = 'Y' ) AS SYS_IMG_NM
 				  ,(SELECT MAX(SYS_FILE_NM) FROM TB_REVIEW_ATTACH WHERE REVIEW_SQ =F.REVIEW_SQ ORDER BY FILE_GB , REVIEW_SQ LIMIT 1) AS REVIEW_SYS_IMG
 				  , CASE IFNULL((SELECT COUNT(SYS_IMG_NM) FROM TB_GOODS_IMG  WHERE GOODS_CD = F.GOODS_CD AND COLOR_CD = F.MAIN_COLOR_CD AND DEFAULT_IMG_YN = 'Y' ),0) 
@@ -455,7 +455,9 @@
 					 ,G.SUPPLY_GOODS_CD
 					 ,G.PNT_PRATE
 					 ,G.PNT_MRATE
+					 ,RA.FILE_GB
 				FROM TB_REVIEW R LEFT JOIN TB_GOODS G ON R.GOODS_CD = G.GOODS_CD 
+								 LEFT JOIN TB_REVIEW_ATTACH RA ON R.REVIEW_SQ = RA.REVIEW_SQ 
 				WHERE 1=1 
 				 AND R.DEL_YN = 'N'
 				 AND R.DISP_YN = 'Y'
@@ -482,7 +484,7 @@
 	<select id="getPlanCouponInfo" parameterType="Coupon" resultType="Coupon">
 		/* TsfPlanning.templateDispOrdInfo*/
 		SELECT F.*
-		      ,(CASE F.CPN_ID WHEN (SELECT CPN_ID FROM TB_CUST_COUPON C WHERE C.CPN_ID = F.CPN_ID )THEN '받기완료'
+		      ,(CASE F.CPN_ID WHEN (SELECT CPN_ID FROM TB_CUST_COUPON C WHERE C.CPN_ID = F.CPN_ID AND CUST_NO = #{custNo})THEN '받기완료'
 		        ELSE '쿠폰받기' END ) AS COUPON_STAT
 		FROM
 		(
@@ -559,5 +561,55 @@
 		 AND PC.PLAN_SQ = #{planSq}
 		 AND PC.DISP_YN = 'Y'
 	</select>
+	
+	<!-- 기획전 상품 1열 전시 -->
+	<select id="getPlanGoods1Info" parameterType="Plan" resultType="Plan">
+		/* TsfPlanning.getPlanGoods1Info */
+		SELECT Z.*
+		      , (CASE WHEN Z.GOODS_TYPE = 'G056_N' THEN (SELECT IFNULL(SUM(CURR_STOCK_QTY - BASE_STOCK_QTY),0) FROM VW_STOCK WHERE GOODS_CD = Z.GOODS_CD) 
+					ELSE (SELECT IFNULL(SUM(CURR_STOCK_QTY - BASE_STOCK_QTY),0) FROM VW_STOCK_COMPOSE WHERE GOODS_CD = Z.GOODS_CD) 
+					END) AS STOCK_QTY_SUM
+			  , (SELECT MAX(SYS_IMG_NM) FROM TB_GOODS_IMG  WHERE GOODS_CD = Z.GOODS_CD AND DEFAULT_IMG_YN = 'Y' ) AS SYS_IMG_NM
+		FROM
+		(
+			SELECT PC.PLAN_CONT_SQ
+			      ,PC.PLAN_SQ
+			      ,PC.TMPL_TYPE
+			      ,PC.TITLE
+			      ,PC.LINK_URL
+			      ,PC.DISP_YN
+			      ,PC.DISP_ORD
+			      ,PCI.PLAN_CONT_ITEM_SQ
+			      ,PCI.ITEM_VAL
+			      ,G.GOODS_CD 
+			      ,G.GOODS_TYPE 
+			      ,G.GOODS_NM 
+			      ,G.LIST_PRICE 
+			      ,G.CURR_PRICE                                                                 
+			      ,G.DC_RATE
+			      ,CASE G.FORMAL_GB WHEN 'G009_20' THEN '이월' ELSE '정상' END AS FORMAL_GB                                                                 
+				  ,G.SEASON_CD       
+				  , (SELECT SUPPLY_COMP_NM
+				 	 FROM   TB_SUPPLY_COMPANY
+				     WHERE  SUPPLY_COMP_CD = G.SUPPLY_COMP_CD
+					) AS SUPPLY_COMP_NM                                                           
+				  ,G.ERP_STOCK_LINK_YN                                                          
+				  ,G.ERP_PRICE_LINK_YN                                                                                                                  
+				  ,G.NEW_CUST_ORD_YN                                                            
+				  ,G.DELV_FEE_CD                                                                
+				  ,G.FRST_CFRM_DT                  
+				  ,G.PRICE_UPD_DT 
+				  ,B.BRAND_ENM 
+		  		  ,B.BRAND_KNM          
+			FROM TB_PLAN_CONTENTS PC INNER JOIN TB_PLAN_CONTENTS_ITEM PCI ON PC.PLAN_CONT_SQ = PCI.PLAN_CONT_SQ 
+									 INNER JOIN TB_GOODS G ON PCI.ITEM_VAL = G.GOODS_CD 
+									 INNER JOIN TB_BRAND B ON G.BRAND_CD = B.BRAND_CD
+                         					AND B.USE_YN = 'Y'	
+			WHERE 1=1
+			 AND PC.TMPL_TYPE = #{tmplType}
+			 AND PC.PLAN_SQ = #{planSq}
+			 AND PC.DISP_YN = 'Y'
+		 )Z
+	</select>
 
 </mapper>

+ 7 - 2
src/main/webapp/WEB-INF/views/web/mypage/MypageGiftcardFormWeb.html

@@ -22,9 +22,14 @@
 		<div class="content myVoucher">
 			<!-- 페이지특정 클래스 = myVoucher -->
 			<div class="cont_body">
-			<div class="lnb">
-						<!-- 마이페이지 lnb 영역 -->
+				<div class="lnb">
+							<div class="lnb_tit">
+						<h2>마이페이지</h2>
 					</div>
+					<div class="lnb_list">
+						<ul id="mypageLnbList"></ul>
+					</div>
+				</div>
 				<div class="cont">
 					<div class="sec_head">
 						<h3 class="subH1">상품권</h3>

+ 196 - 4
src/main/webapp/WEB-INF/views/web/planning/PlanningDetailFormWeb.html

@@ -46,7 +46,28 @@
 								<!-- 상단배너 -->
 							</div>
 							<th:block th:each="a, template : ${templateOrd}">
-								<div class="coner_item01" th:id="${a.tmplType}"></div>
+							<th:block th:if="${a.tmplType == 'G082_10'}">
+									<div class="coner_item01" th:id="${a.tmplType + a.planContSq}"></div>
+								</th:block>
+							<th:block th:if="${a.tmplType == 'G082_20'}">
+									<div class="coner_item01" th:id="${a.tmplType + a.planContSq}"></div>
+								</th:block>
+							<th:block th:if="${a.tmplType == 'G082_30'}">
+									<div class="coner_item01" th:id="${a.tmplType + a.planContSq}"></div>
+								</th:block>
+							<th:block th:if="${a.tmplType == 'G082_40'}">
+									<div class="coner_item01" th:id="${a.tmplType + a.planContSq}"></div>
+								</th:block>
+								<th:block th:if="${a.tmplType == 'G082_50'}">
+									<div class="coner_item01" th:id="${a.tmplType + a.planContSq}"></div>
+								</th:block>
+								<th:block th:if="${a.tmplType == 'G082_51'}">
+									<div class="coner_visual dp_recommend_item" th:id="${a.tmplType + a.planContSq}"></div>
+								</th:block>
+								<th:block th:if="${a.tmplType == 'G082_52'}">
+									<div class="coner_item01" th:id="${a.tmplType + a.planContSq}"></div>
+								</th:block>
+								
 							</th:block>
 							<div class="coner_front">
 								<div class="promotion_visual" th:if="${fsrcInfoBtm != null}" th:utext="${fsrcInfoBtm.fsrcPc}"></div>
@@ -195,6 +216,12 @@ let review = [[${reviewInfo}]];
 let coupon = [[${couponInfo}]];
 let plan = [[${planInfo}]];
 let image = [[${imageInfo}]];
+let goods1 = [[${goods1Info}]];
+let goods2 = [[${goods2Info}]];
+let goods4 = [[${goods4Info}]];
+let template =[[${templateOrd}]];
+let _mall = [[${@environment.getProperty('domain.front')}]];
+
 
 if(review != null || review != ''){
 		
@@ -213,9 +240,11 @@ if(review != null || review != ''){
 		html += '					<a href="javascript:void();" onclick="fnPlanReviewDetail(\''+review[i].reviewSq+'\');">';
 		html += '						<div class="lap">';
 		html += '							<div class="pic">';
-		html += '								<span class="thumb"';
-		html += '									style="background-image: url('+ _imgUrl +'/'+review[i].reviewSysImg +');"></span>';
-		html += '								<!-- 동영상의 썸네일일 경우 mov 클래스 추가 -->';
+		if (review[i].fileGb == 'M') { 
+			html += '								<span class="thumb mov" style="background-image: url('+ _imgUrl +'/'+review[i].reviewSysImg +');"></span>';	
+		}else{
+			html += '								<span class="thumb" style="background-image: url('+ _imgUrl +'/'+review[i].reviewSysImg +');"></span>';			
+		}
 		html += '							</div>';
 		html += '							<div class="info">';
 		html += '								<div>';
@@ -357,7 +386,143 @@ if(image != null || image != ''){
 	
 	$("#G082_30").append(html);
 }
+
+if(goods1 != null || goods1 != ''){
+	var array = [];
+
+	for (var j = 0; j < template.length; j++) {
+		if(template[j].tmplType == 'G082_50'){
+			array.push(goods1[j].planContSq);
+		}
+		
+	}	
 	
+	for (var i = 0; i < template.length; i++) {
+		var html = '';
+		
+		if(template[i].tmplType == 'G082_50' && array[0] == template[i].planContSq && typeof array[0] != 'undefined'){
+			html += '<div class="dp_listItems_wrap"> ';
+			html += '    <div>';
+			if (template[i].linkUrl != null) { /* 링크 변경 예정 */
+				html += '        <a href="http://'+template[i].linkUrl+'" target="_blank">'+template[i].title+'</a>';
+			}else{
+				html += '        <a href="javascript:void(0)">'+template[i].title+'</a>';
+			}
+			
+			html += '    </div>';
+			html += '    <div class="dp_listItems_cont">';
+			html += '        <ul>';
+			
+			for (var j = 0; j < goods1.length; j++) {
+				if (goods1[j].planContSq == template[i].planContSq) {
+					html += '            <li>';
+					html += '                <div class="dp_listItems">';
+					html += '                    <div class="dp_listItems_img">';
+					html += '                        <img src="'+ _imgUrl +'/'+goods1[j].sysImgNm +'" alt="">';
+					html += '                    </div>';
+					html += '                    <div class="dp_listItems_info">';
+					html += '                        <div class="dp_listItems_brand">'+goods1[j].brandKnm+'</div>';
+					html += '                        <div class="dp_listItems_name">'+goods1[j].goodsNm+'</div>';
+					html += '                        <div class="dp_listItems_price">';
+					html += '                            <span class="price">'+goods1[j].currPrice+'</span>';
+					if (goods1[j].currPrice != goods1[j].listPrice) {
+						html += '                            <del>'+goods1[j].listPrice+'</del>';
+						html += '                            <span class="percent">'+goods1[j].dcRate+'</span>';
+					}
+					
+					html += '                        </div>';
+					//html += '                        <div class="itemComment">#주문 폭주 상품</div>';
+					html += '                        <div class="ui_row">';
+					html += '                            <button type="button" class="btn btn_default" onclick="location.href=\''+_mall+'/goods/detail/form?goodsCd='+goods1[j].goodsCd+'\'"><span>자세히 보기</span></button>';
+					html += '                        </div>';
+					html += '                    </div>';
+					html += '                </div>';
+					html += '            </li>';
+						
+				}
+			}
+			html += '        </ul>';
+			html += '    </div>';
+			html += '</div>';
+			$("#G082_50" +array[0]).append(html);
+		}
+		
+		if($("#G082_50" +template[i].planContSq).length){
+			array.shift();
+		}
+	}
+
+}
+	
+if(goods2 != null || goods2 != ''){
+	var array = [];
+
+	for (var j = 0; j < template.length; j++) {
+		if(template[j].tmplType == 'G082_51'){
+			array.push(template[j].planContSq);
+		}
+	}	
+	for (var i = 0; i < template.length; i++) {
+		var html = '';
+		
+		if(template[i].tmplType == 'G082_51' && array[0] == template[i].planContSq && typeof array[0] != 'undefined'){
+			//html+='<div class="coner_visual dp_recommend_item">';
+			html+='    <div class="dp_banner_slide">';
+			html+='        <div class="slide_head">';
+			if (template[i].linkUrl != null) { /* 링크 변경 예정 */
+				html+='            <a href="http://'+template[i].linkUrl+'" target="_blank">'+template[i].title+'</a>';
+			}else{
+				html+='            <a href="javascript:void(0)">'+template[i].title+'</a>';
+			}
+			
+			html+='        </div>';
+			html+='        <div class="swiper-container dp_lookbook_case2">';
+			html+='            <div class="swiper-wrapper ">';
+			
+	  	  for (var j = 0; j < goods2.length; j++) {
+				if (goods2[j].planContSq == template[i].planContSq) {
+					html+='                <div class="swiper-slide">';
+					html+='                    <div class="item_prod">';
+					html+='                        <div class="item_state">';
+					html+='                            <a href="'+_mall+'/goods/detail/form?goodsCd='+goods2[j].goodsCd+'" class="itemLink">';
+					html+='                                <div class="itemPic">';
+					html+='                                    <img alt="BLUE-a" class=" vLHTC pd_img" src="'+ _imgUrl +'/'+goods2[j].sysImgNm +'">';
+					html+='                                </div>';
+					html+='                                <p class="itemBrand">'+goods2[j].brandKnm+'</p>';
+					html+='                                <div class="itemName">'+goods2[j].goodsNm+'</div>';
+					html+='                               <p class="itemPrice">'+goods2[j].currPrice;
+					if (goods2[j].currPrice != goods2[j].listPrice) {
+						html+='                                    <span class="itemPrice_original">'+goods2[j].listPrice+'</span>';
+						html+='                                    <span class=" itemPercent">'+goods2[j].dcRate+'</span>';
+					}
+					
+					html+='                                </p>';
+					//html+='                                <div class="itemComment">#주문 폭주 상품</div>';
+					html+='                            </a>';
+					html+='                        </div>';
+					html+='                    </div>';
+					html+='                </div>                ';
+				}
+			} 
+		 
+			html+='            </div>';
+			html+='        </div>';
+			html+='        <div class="swiper-button-prev "></div>';
+			html+='        <div class="swiper-button-next "></div>';
+			html+='        <div class="swiper-pagination"></div>';
+			html+='    </div>';
+			//html+='</div>';
+			
+			$("#G082_51" +array[0]).append(html);
+		}
+		
+		if($("#G082_51" +template[i].planContSq).length){
+			array.shift();
+		}
+	}
+
+		
+}
 </script>
 		<script type="text/javascript">
 	    // 컨텐츠 호출
@@ -406,6 +571,33 @@ if(image != null || image != ''){
 					prevEl: '.dp_foot_banner .swiper-button-prev',
 				},
 			});
+            var dp_foot_banner_slide = new Swiper ('.dp_foot_banner .swiper-container', {
+                loop: false,
+                slidesPerView: 5,
+                spaceBetween: 20,
+                speed : 800,
+                navigation: {
+                    nextEl: '.dp_foot_banner .swiper-button-next',
+                    prevEl: '.dp_foot_banner .swiper-button-prev',
+                },
+            });
+
+            var dp_foot_banner_slide02 = new Swiper ('.dp_recommend_item .dp_lookbook_case2', {
+                loop: false,
+                slidesPerView: 2,
+                slidesPerGroup: 2,
+                spaceBetween: 0,
+                speed : 800,
+                navigation: {
+                    nextEl: '.dp_recommend_item .swiper-button-next',
+                    prevEl: '.dp_recommend_item .swiper-button-prev',
+                },
+                pagination: {
+                    el: '.dp_recommend_item .swiper-pagination',
+                    clickable: true,
+                },
+            });
+
             
             //내부앵커이동
             $(".bullet_sticky_nav li a").on("click", function(){