浏览代码

Merge branch 'sowon' into develop

sowon4187 5 年之前
父节点
当前提交
8f00a9a21e

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

@@ -215,7 +215,7 @@ public interface TsfPlanningDao {
 	 * @author sowon
 	 * @date 2021. 3. 23
 	 */
-	Collection<Plan> getPlanGoods1Info(Plan plan);
+	Collection<Plan> getPlanGoodsDisplayList(Plan plan);
 	
 
 	/**

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

@@ -240,8 +240,8 @@ public class TsfPlanningService {
 	 * @author sowon
 	 * @since 2021. 3. 22
 	 */
-	public Collection<Plan> getPlanGoods1Info(Plan plan) {
-		return planningDao.getPlanGoods1Info(plan);
+	public Collection<Plan> getPlanGoodsDisplayList(Plan plan) {
+		return planningDao.getPlanGoodsDisplayList(plan);
 	}
 	
 	/**

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

@@ -1148,6 +1148,9 @@ public class TsfMypageController extends TsfBaseController {
 	@GetMapping("/wish/list")
 	public ModelAndView mypageWishGoodsList(WishList wishList) {
 		ModelAndView mav = new ModelAndView();
+		wishList.setSiteCd(TscConstants.Site.STYLE24.value());
+		wishList.setFrontGb(TsfSession.getFrontGb());
+		wishList.setCustGb(TsfSession.getCustGb());
 		// 위시리스트 달
 		mav.addObject("wishMonth", wishListService.getWishListMonth(wishList));
 		// 위시리스트 상품목록

+ 9 - 6
src/main/java/com/style24/front/biz/web/TsfPlanningController.java

@@ -141,6 +141,8 @@ public class TsfPlanningController extends TsfBaseController {
 		plan.setSiteCd(TscConstants.Site.STYLE24.value());
 		plan.setFrontGb(TsfSession.getFrontGb());
 		plan.setCustGb(TsfSession.getCustGb());
+		review.setFrontGb(TsfSession.getFrontGb());
+		review.setCustGb(TsfSession.getCustGb());
 		plan.setCustNo(TsfSession.isLogin() ? TsfSession.getInfo().getCustNo() : 0);
 
 		// 기본 set
@@ -176,21 +178,22 @@ public class TsfPlanningController extends TsfBaseController {
 
 		// 이미지
 		mav.addObject("imageInfo", planningService.getPlanImageInfo(plan));
-
+		
+		plan.setFrontGb(TsfSession.getFrontGb());
 		// 상품1열 전시
 		plan.setTmplType("G082_50");
-		mav.addObject("goods1Info", planningService.getPlanGoods1Info(plan));
+		mav.addObject("goods1Info", planningService.getPlanGoodsDisplayList(plan));
 
 		// 상품2열 전시
 		plan.setTmplType("G082_51");
-		mav.addObject("goods2Info", planningService.getPlanGoods1Info(plan));
+		mav.addObject("goods2Info", planningService.getPlanGoodsDisplayList(plan));
 
 		//상품4열 전시
 		plan.setTmplType("G082_52");
-		mav.addObject("goods4Info", planningService.getPlanGoods1Info(plan));
+		mav.addObject("goods4Info", planningService.getPlanGoodsDisplayList(plan));
 
 		// 다른기획전 보기 
-		plan.setFrontGb(TsfSession.getFrontGb());
+		
 		mav.addObject("planList", planningService.getPlanningList(plan));
 //
 //		mav.addObject("couponList", planningService.getPlusCouponList(plan));
@@ -216,7 +219,7 @@ public class TsfPlanningController extends TsfBaseController {
 		mav.addObject("viewPage", "G037_40");
 		mav.addObject("popupPlanSq", plan.getPlanSq());
 
-		mav.setViewName(super.getDeviceViewName("planning/PlanningDetailForm2"));
+		mav.setViewName(super.getDeviceViewName("planning/PlanningDetailForm"));
 		return mav;
 	}
 

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

@@ -49,6 +49,8 @@ public class Review extends TscBaseDomain {
 	private String admRpl;			// 관리자댓글
 	private int admRplRegNo;		// 댓글등록자번호
 	private String admRplDt;		// 관리자댓글등록일시
+	private String frontGb;			
+	private String custGb;
 	
 	private String custId;			// 고객ID
 	private String sysImgNm;		// 상품대표이미지

+ 3 - 0
src/main/java/com/style24/persistence/domain/WishList.java

@@ -22,6 +22,9 @@ public class WishList extends TscBaseDomain {
 	private String contentsLoc;
 	private Integer planDtlSq;
 	private String regDt;
+	private String siteCd;
+	private String frontGb;
+	private String custGb;
 	@JsonFormat(with = JsonFormat.Feature.ACCEPT_SINGLE_VALUE_AS_ARRAY)
 	private String[] arrGoodsCd;
 

+ 96 - 48
src/main/java/com/style24/persistence/mybatis/shop/TsfPlanning.xml

@@ -481,7 +481,7 @@
 					 ,F.GOODS_TYPE
 					 ,F.TAG_PRICE
 					 ,F.LIST_PRICE
-					 ,F.CURR_PRICE
+					 ,FN_GET_BENEFIT_PRICE(#{frontGb},F.GOODS_CD,F.CURR_PRICE,#{custGb})                              AS CURR_PRICE
 					 ,F.CURR_BPRICE
 					 ,F.PRICE_UPD_DT
 					 ,F.COST_PRICE
@@ -547,7 +547,7 @@
 					 ,G.GOODS_TYPE
 					 ,G.TAG_PRICE
 					 ,G.LIST_PRICE
-					 ,G.CURR_PRICE
+					 ,FN_GET_BENEFIT_PRICE(#{frontGb},G.GOODS_CD,G.CURR_PRICE,#{custGb})                              AS CURR_PRICE
 					 ,G.CURR_BPRICE
 					 ,G.PRICE_UPD_DT
 					 ,G.COST_PRICE
@@ -672,54 +672,101 @@
 		 AND PC.DISP_YN = 'Y'
 	</select>
 	
-	<!-- 기획전 상품 1열 전시 -->
-	<select id="getPlanGoods1Info" parameterType="Plan" resultType="Plan">
-		/* TsfPlanning.getPlanGoods1Info */
+	<!-- 기획전 상품  전시 -->
+	<select id="getPlanGoodsDisplayList" parameterType="Plan" resultType="Plan">
+		/* TsfPlanning.getPlanGoodsDisplayList */
 		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
+		      ,100 - ROUND((Z.CURR_PRICE / Z.LIST_PRICE) * 100 ,0) AS DC_RATE 
 		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
+		WITH TAB_PLAN_GOODS AS (
+		    SELECT P.PLAN_SQ                                                /*기획전번호*/
+		         , PC.LINK_URL 
+		         , PC.DISP_ORD 
+		         , PC.TITLE 
+		         , PC.TMPL_TYPE 
+		         , PC.PLAN_CONT_SQ 		         
+		         , PCI.ITEM_VAL 
+		         , PCI.REVIEW_DISP_EDDT 
+		         , PCI.REVIEW_DISP_STDT 
+		         , CASE WHEN BG.DISP_NM_LANG = 'EN' THEN
+		                    BG.BRAND_GROUP_ENM
+		                ELSE
+		                    BG.BRAND_GROUP_KNM
+		           END                                    AS BRAND_GROUP_NM /*브랜드그룹명*/
+		         , G.GOODS_CD                                               /*상품코드*/
+		         , G.GOODS_NM                                               /*상품명*/
+		         , G.GOODS_GB                                               /*상품구분*/
+		         , G.FOREIGN_BUY_YN                                         /*해외구매대행여부*/
+		         , G.PARALLEL_IMPORT_YN                                     /*병행수입여부*/
+		         , G.ORDER_MADE_YN                                          /*주문제작여부*/
+		         , G.GOODS_TNM                                              /*상품타이틀명*/
+		         , G.MAIN_COLOR_CD                                          /*대표색상코드*/
+		         , G.LIST_PRICE                                             /*정상가(최초판매가)*/
+		         , G.CURR_PRICE                                             /*현재판매가*/
+		    FROM   TB_PLAN P
+		    	 , TB_PLAN_CONTENTS PC
+		    	 , TB_PLAN_CONTENTS_ITEM PCI
+		         , TB_GOODS G
+		         , TB_GOODS_STOCK GS
+		         , TB_BRAND B
+		         , TB_BRAND_GROUP BG
+		    WHERE  P.PLAN_SQ = PC.PLAN_SQ
+		    AND    PC.PLAN_CONT_SQ = PCI.PLAN_CONT_SQ
+		    AND    PCI.ITEM_VAL = G.GOODS_CD
+		    AND    G.GOODS_CD = GS.GOODS_CD
+		    AND    G.BRAND_CD = B.BRAND_CD
+		    AND    B.BRAND_GROUP_NO = BG.BRAND_GROUP_NO
+		    AND    P.PLAN_SQ =  #{planSq} /**P*/
+		    -- AND    P.PLAN_GB = 'P' /*기획전*/
+		    AND    P.SITE_CD =  #{siteCd} /**P*/
+		    <if test="frontGb != null and frontGb != ''">
+		    AND    P.FRONT_GB LIKE CONCAT('%',#{frontGb},'%')
+		    </if>
+		    AND    NOW() BETWEEN P.DISP_STDT AND P.DISP_EDDT
+		    AND    P.DEL_YN = 'N' /*삭제안된 기획전*/
+		    AND    P.OPEN_YN = 'Y' /*오픈된 기획전*/
+		    AND    PC.TMPL_TYPE = #{tmplType}
+		    AND    PC.DISP_YN = 'Y' /*전시하는템플릿*/
+		    AND    G.GOODS_STAT = 'G008_90' /*승인완료상품*/
+		    AND    G.SELF_MALL_YN = 'Y'   /*몰노출상품*/
+		    AND    GS.STOCK_QTY  >  0 /*재고있는상품*/
+		    AND    B.USE_YN = 'Y'
+		    AND    BG.USE_YN = 'Y'
+		    AND    NOW() BETWEEN G.SELL_STDT AND G.SELL_EDDT
+		)
+		, TAB_GOODS_IMG AS (
+		    /* 상품의 이미지 */
+		    SELECT PG.GOODS_CD
+		         , MAX(CASE WHEN GI.DEFAULT_IMG_YN = 'Y' THEN GI.SYS_IMG_NM ELSE NULL END)   AS SYS_IMG_NM
+		         , MAX(CASE WHEN GI.MOUSEOVER_IMG_YN = 'Y' THEN GI.SYS_IMG_NM ELSE NULL END) AS SYS_IMG_NM2
+		    FROM   TAB_PLAN_GOODS PG
+		         , TB_GOODS_IMG GI
+		    WHERE  PG.GOODS_CD = GI.GOODS_CD
+		    AND    PG.MAIN_COLOR_CD = GI.COLOR_CD
+		    AND    (GI.DEFAULT_IMG_YN = 'Y' OR GI.MOUSEOVER_IMG_YN = 'Y')
+		    GROUP  BY PG.GOODS_CD
+		)
+		SELECT PG.PLAN_SQ
+		     , PG.DISP_ORD
+		     , PG.BRAND_GROUP_NM
+		     , PG.GOODS_CD
+		     , PG.TITLE
+		     , PG.TMPL_TYPE
+		     , PG.LINK_URL
+		     , PG.ITEM_VAL
+		     , PG.PLAN_CONT_SQ
+		     , FN_GET_GOODS_NM(PG.GOODS_NM,PG.GOODS_GB,PG.FOREIGN_BUY_YN,PG.PARALLEL_IMPORT_YN,PG.ORDER_MADE_YN) AS GOODS_FULL_NM /*상품FULL명*/
+		     , PG.GOODS_NM
+		     , PG.GOODS_TNM
+		     , PG.MAIN_COLOR_CD
+		     , PG.LIST_PRICE
+		     , FN_GET_BENEFIT_PRICE(#{frontGb},PG.GOODS_CD,PG.CURR_PRICE,#{custGb})                     AS CURR_PRICE    /*현재판매가*/
+		     , GI.SYS_IMG_NM
+		     , GI.SYS_IMG_NM2
+			FROM   TAB_PLAN_GOODS PG
+		INNER JOIN TAB_GOODS_IMG GI ON PG.GOODS_CD = GI.GOODS_CD
+		)Z
 	</select>
 	
 	<!-- 기획전 코너 목록 -->
@@ -781,7 +828,7 @@
 		    AND    G.BRAND_CD = B.BRAND_CD
 		    AND    B.BRAND_GROUP_NO = BG.BRAND_GROUP_NO
 		    AND    P.PLAN_SQ = #{planSq}
-		    AND    P.PLAN_GB = 'P' /*기획전*/
+		    -- AND    P.PLAN_GB = 'P' /*기획전*/
 		    AND    P.SITE_CD = #{siteCd}
 		    <if test="frontGb != null and frontGb != ''">
 		    AND    P.FRONT_GB LIKE CONCAT('%',#{frontGb},'%')
@@ -797,6 +844,7 @@
 		    AND    GS.STOCK_QTY <![CDATA[>]]> 0 /*재고있는상품*/
 		    AND    B.USE_YN = 'Y'
 		    AND    BG.USE_YN = 'Y'
+		    AND    NOW() BETWEEN G.SELL_STDT AND G.SELL_EDDT
 		)
 		, TAB_GOODS_IMG AS (
 		    /* 상품의 이미지 */

+ 6 - 6
src/main/java/com/style24/persistence/mybatis/shop/TsfReview.xml

@@ -341,10 +341,10 @@
 			      ,I.SIZE_GB 
 			      ,DATEDIFF( DATE_ADD(O.PAY_DT,INTERVAL 90 DAY),NOW()) AS REMAIN_DT -- 남은시간
 			FROM TB_ORDER O INNER JOIN TB_ORDER_DETAIL OD ON O.ORD_NO = OD.ORD_NO 
-								 			 	 AND OD.ORD_DTL_STAT = 'G013_70' -- 구매 확정인것만
+								 			 	 AND OD.ORD_DTL_STAT IN ('G013_70','G013_50','G013_60') -- 구매 확정인것만
 			                INNER JOIN TB_ORDER_DETAIL_ITEM ODI ON OD.ORD_DTL_NO = ODI.ORD_DTL_NO 
 			                  					 AND OD.ORD_DTL_NO = ODI.ORD_DTL_NO
-			                  	                 AND ODI.ORD_DTL_STAT = 'G013_70'
+			                  	                 AND ODI.ORD_DTL_STAT IN ('G013_70','G013_50','G013_60')
 			                INNER JOIN TB_GOODS G ON G.GOODS_CD = OD.GOODS_CD 
 			                INNER JOIN TB_BRAND B ON B.BRAND_CD = G.BRAND_CD
 			                LEFT JOIN TB_ITEMKIND I ON G.ITEMKIND_CD = I.ITEMKIND_CD 
@@ -442,10 +442,10 @@
 				  </if>
 			      ,DATEDIFF( DATE_ADD(O.PAY_DT,INTERVAL 90 DAY),NOW()) AS REMAIN_DT -- 남은시간
 			FROM TB_ORDER O INNER JOIN TB_ORDER_DETAIL OD ON O.ORD_NO = OD.ORD_NO 
-								 			 	 AND OD.ORD_DTL_STAT = 'G013_70' -- 구매 확정인것만
+								 			 	 AND OD.ORD_DTL_STAT IN ('G013_70','G013_50','G013_60') -- 구매 확정인것만
 			                INNER JOIN TB_ORDER_DETAIL_ITEM ODI ON OD.ORD_DTL_NO = ODI.ORD_DTL_NO 
 			                  					 AND OD.ORD_DTL_NO = ODI.ORD_DTL_NO
-			                  	                AND ODI.ORD_DTL_STAT = 'G013_70'
+			                  	                AND ODI.ORD_DTL_STAT IN ('G013_70','G013_50','G013_60')
 			                INNER JOIN TB_GOODS G ON G.GOODS_CD = OD.GOODS_CD 
 			                INNER JOIN TB_BRAND B ON B.BRAND_CD = G.BRAND_CD
 			                LEFT JOIN TB_ITEMKIND I ON G.ITEMKIND_CD = I.ITEMKIND_CD
@@ -508,10 +508,10 @@
 			      ,B.BRAND_ENM 
 			      ,DATEDIFF( DATE_ADD(O.PAY_DT,INTERVAL 90 DAY),NOW()) AS DT -- 남은시간
 			FROM TB_ORDER O INNER JOIN TB_ORDER_DETAIL OD ON O.ORD_NO = OD.ORD_NO 
-								 				 AND OD.ORD_DTL_STAT = 'G013_70'--  구매 확정인것만
+								 				 AND OD.ORD_DTL_STAT IN ('G013_70','G013_50','G013_60') --  구매 확정인것만
 			                INNER JOIN TB_ORDER_DETAIL_ITEM ODI ON OD.ORD_DTL_NO = ODI.ORD_DTL_NO 
 			                  					 AND OD.ORD_DTL_NO = ODI.ORD_DTL_NO
-			                  	                 AND ODI.ORD_DTL_STAT = 'G013_70'
+			                  	                 AND ODI.ORD_DTL_STAT IN ('G013_70','G013_50','G013_60')
 			                INNER JOIN TB_GOODS G ON G.GOODS_CD = OD.GOODS_CD 
 			                INNER JOIN TB_BRAND B ON B.BRAND_CD = G.BRAND_CD
 			WHERE 1=1

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

@@ -70,7 +70,7 @@
 				     , ''                                                                                           AS LIKE_IT       /*위시리스트담긴상품*/
 			            </otherwise>
 		             </choose>
-				FROM TB_SOCIAL A INNER JOIN tb_social_goods B ON A.SOCIAL_SQ = B.SOCIAL_SQ 
+				FROM TB_SOCIAL A INNER JOIN TB_SOCIAL_GOODS B ON A.SOCIAL_SQ = B.SOCIAL_SQ 
 				                 INNER JOIN TB_GOODS C ON B.GOODS_CD = C.GOODS_CD 
 				                 INNER JOIN TB_BRAND D ON C.BRAND_CD = D.BRAND_CD
 				                 LEFT JOIN TB_WISHLIST W ON C.GOODS_CD = W.GOODS_CD
@@ -81,6 +81,7 @@
 				  AND A.APPLY_GB = 'A'					 /*적용구분(P:대기,A:적용,F:종료)*/
 				  AND A.FRONT_GB IN ('A',#{frontGb})	 /*프론트 구분*/
 				  AND B.DEL_YN = 'N'
+				  AND NOW() BETWEEN C.SELL_STDT AND C.SELL_EDDT
 				ORDER BY B.DISP_ORD 
 			)F
 			WHERE F.SOCIAL_SQ = #{socialSq}

+ 72 - 59
src/main/java/com/style24/persistence/mybatis/shop/TsfWishlist.xml

@@ -16,6 +16,7 @@
 	
 	<!-- 위시리스트 월 -->
 	<select id="getWishListMonth" resultType="WishList" parameterType="WishList">
+		/* TsfWishlist.getWishListMonth*/
 		SELECT COUNT(*) AS COUNT
 		      ,DATE_FORMAT(W.REG_DT,'%Y.%m') AS REG_DT 
 		FROM TB_WISHLIST W
@@ -25,66 +26,78 @@
 	
 	<!-- 위시리스트 상품목록 (임시 = 수정예정)-->
 	<select id="getWishListGoodsList" parameterType="WishList" resultType="Goods">
-		/**/
+		/* TsfWishlist.getWishListGoodsList*/
 		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
-		FROM 
-		      (
-		       SELECT  G.GOODS_CD
-		              ,G.BRAND_CD
-		              ,G.ITEMKIND_CD
-		              ,G.GOODS_NM
-		              ,G.GOODS_TNM
-		              ,G.GOODS_SNM
-		              ,G.GOODS_SNM1
-		              ,G.MAIN_COLOR_CD
-		              ,G.GOODS_NUM
-		              ,G.GOODS_TYPE
-		              ,G.TAG_PRICE
-		              ,G.LIST_PRICE
-		              ,G.CURR_PRICE
-		              ,G.CURR_BPRICE
-		              ,G.PRICE_UPD_DT
-		              ,G.COST_PRICE
-		              ,G.DC_RATE
-		              ,G.GOODS_STAT
-		              ,G.SELF_MALL_YN
-		              ,G.GOODS_GB
-		              ,G.DISTRIBUTION_GB
-		              ,G.SELF_GOODS_YN
-		              ,G.SUPPLY_COMP_CD
-		              ,G.SUPPLY_GOODS_CD
-		              ,G.PNT_PRATE
-		              ,G.PNT_MRATE
-		              ,W.AF_LINK_CD 
-		              ,W.CONTENTS_LOC 
-		              ,W.CUST_NO 
-		              ,W.ITHR_CD 
-		              ,W.PLAN_DTL_SQ 
-		              ,W.REG_DT 
-		              ,BR.BRAND_GROUP_KNM
-		              ,BR.BRAND_KNM
-		       FROM TB_GOODS G INNER JOIN TB_WISHLIST W ON G.GOODS_CD = W.GOODS_CD 
-								LEFT JOIN (
-								            SELECT B.BRAND_CD 
-								                  ,B.BRAND_ENM
-								                  ,B.BRAND_KNM 
-								                  ,B.BRAND_GRP_NM 
-								                  ,B.USE_YN 
-								                  ,BG.BRAND_GROUP_NO 
-								                  ,BG.BRAND_GROUP_ENM 
-								                  ,BG.BRAND_GROUP_KNM 
-								            FROM TB_BRAND B INNER JOIN TB_BRAND_GROUP BG ON B.BRAND_GROUP_NO = BG.BRAND_GROUP_NO
-								             WHERE 1=1
-								               AND B.USE_YN = 'Y'
-								               AND BG.USE_YN = 'Y'
-								         )BR ON G.BRAND_CD = BR.BRAND_CD
-              WHERE 1=1
-	            AND W.CUST_NO = #{custNo}
-           )Z
-		ORDER BY W.REG_DT DESC
+			      ,100 - ROUND((Z.CURR_PRICE / Z.LIST_PRICE) * 100 ,0) AS DC_RATE 
+			FROM
+			(
+			WITH TAB_PLAN_GOODS AS (
+			    SELECT W.AF_LINK_CD 
+			          ,W.CONTENTS_LOC 
+			          ,W.CUST_NO 
+			          ,W.REG_DT 
+			          ,CASE WHEN BG.DISP_NM_LANG = 'EN' THEN
+			                    BG.BRAND_GROUP_ENM
+			                ELSE
+			                    BG.BRAND_GROUP_KNM
+			           END                                    AS BRAND_GROUP_NM /*브랜드그룹명*/
+			         , G.GOODS_CD                                               /*상품코드*/
+			         , G.GOODS_NM                                               /*상품명*/
+			         , G.GOODS_GB                                               /*상품구분*/
+			         , G.FOREIGN_BUY_YN                                         /*해외구매대행여부*/
+			         , G.PARALLEL_IMPORT_YN                                     /*병행수입여부*/
+			         , G.ORDER_MADE_YN                                          /*주문제작여부*/
+			         , G.GOODS_TNM                                              /*상품타이틀명*/
+			         , G.MAIN_COLOR_CD                                          /*대표색상코드*/
+			         , G.LIST_PRICE                                             /*정상가(최초판매가)*/
+			         , G.CURR_PRICE                                             /*현재판매가*/
+			    FROM   TB_WISHlIST W
+			         , TB_GOODS G
+			         , TB_GOODS_STOCK GS
+			         , TB_BRAND B
+			         , TB_BRAND_GROUP BG
+			    WHERE  W.GOODS_CD = G.GOODS_CD 
+			    AND    G.GOODS_CD = GS.GOODS_CD
+			    AND    G.BRAND_CD = B.BRAND_CD
+			    AND    B.BRAND_GROUP_NO = BG.BRAND_GROUP_NO
+			    AND    G.GOODS_STAT = 'G008_90' /*승인완료상품*/
+			    AND    G.SELF_MALL_YN = 'Y'   /*몰노출상품*/
+			    AND    GS.STOCK_QTY  >  0 /*재고있는상품*/
+			    AND    B.USE_YN = 'Y'
+			    AND    BG.USE_YN = 'Y'
+			    AND    W.CUST_NO = #{custNo}
+			    AND    NOW() BETWEEN G.SELL_STDT AND G.SELL_EDDT
+			)
+			, TAB_GOODS_IMG AS (
+			    SELECT PG.GOODS_CD
+			         , MAX(CASE WHEN GI.DEFAULT_IMG_YN = 'Y' THEN GI.SYS_IMG_NM ELSE NULL END)   AS SYS_IMG_NM
+			         , MAX(CASE WHEN GI.MOUSEOVER_IMG_YN = 'Y' THEN GI.SYS_IMG_NM ELSE NULL END) AS SYS_IMG_NM2
+			    FROM   TAB_PLAN_GOODS PG
+			         , TB_GOODS_IMG GI
+			    WHERE  PG.GOODS_CD = GI.GOODS_CD
+			    AND    PG.MAIN_COLOR_CD = GI.COLOR_CD
+			    AND    (GI.DEFAULT_IMG_YN = 'Y' OR GI.MOUSEOVER_IMG_YN = 'Y')
+			    GROUP  BY PG.GOODS_CD
+			)
+			SELECT 
+			       PG.BRAND_GROUP_NM
+			     , PG.GOODS_CD
+			     , FN_GET_GOODS_NM(PG.GOODS_NM,PG.GOODS_GB,PG.FOREIGN_BUY_YN,PG.PARALLEL_IMPORT_YN,PG.ORDER_MADE_YN) AS GOODS_FULL_NM /*상품FULL명*/
+			     , PG.GOODS_NM
+			     , PG.GOODS_TNM
+			     , PG.MAIN_COLOR_CD
+			     , PG.LIST_PRICE
+			     , PG.AF_LINK_CD 
+			     , PG.CONTENTS_LOC 
+			     , PG.CUST_NO 
+			     , PG.REG_DT
+			     , FN_GET_BENEFIT_PRICE(#{frontGb},PG.GOODS_CD,PG.CURR_PRICE,#{custGb})                     AS CURR_PRICE    /*현재판매가*/
+			     , GI.SYS_IMG_NM
+			     , GI.SYS_IMG_NM2
+				FROM   TAB_PLAN_GOODS PG
+			INNER JOIN TAB_GOODS_IMG GI ON PG.GOODS_CD = GI.GOODS_CD
+			)Z
+		ORDER BY Z.REG_DT DESC
 	</select>
 	
 

+ 4 - 4
src/main/webapp/WEB-INF/views/web/mypage/MypageWishListWeb.html

@@ -18,7 +18,7 @@
  -->
 <!-- 월별 관심상품 -->
 <th:block th:if="${wishMonth != null}" th:each="WishMonth, wishStat : ${wishMonth}">
-<div class="monthly_wish_wrap">
+<div class="monthly_wish_wrap" th:with="frontUrl=${@environment.getProperty('domain.front')}, goodsView=${@environment.getProperty('upload.goods.view')}">
 	<div class="date">
 		<span th:text="${WishMonth.regDt}"></span>
 	</div>
@@ -29,9 +29,9 @@
 				<button type="button" class="itemLike active" th:attr="goodsCd=${WishGoods.goodsCd}, ithrCd='', contentsLoc='', planDtlSq=''" onclick="wishlistDelete(this)">관심상품 추가</button>
 				<a href="javascript:void(0);" class="itemLink" th:onclick="cfnGoToGoodsDetail([[${WishGoods.goodsCd}]])">
 					<div class="itemPic">
-						<img alt="" class=" vLHTC pd_img" src="/images/pc/thumb/prod5.jpg">
+						<img alt="" class=" vLHTC pd_img" th:src="${goodsView + '/' +WishGoods.sysImgNm}">
 					</div>
-					<p class=" itemBrand" th:text="${WishGoods.brandKnm}"></p>
+					<p class=" itemBrand" th:text="${WishGoods.brandGroupNm}"></p>
 					<div class=" itemName" th:text="${WishGoods.goodsNm}"></div>
 					<p class="itemPrice">[[${#numbers.formatInteger(WishGoods.currPrice,3,'POINT') + '원'}]]
 						<span class="itemPrice_original"  th:if="${WishGoods.currPrice != WishGoods.listPrice}" th:text="${#numbers.formatInteger(WishGoods.listPrice,3,'POINT') + '원'}"></span>
@@ -45,7 +45,7 @@
 					 <p class="itemBadge">
 						<span class="badge13">베스트 </span>
 					</p>
-					<div class="itemComment">★ [NEW] 20FW 빅웨이브 단독발매!</div>
+					<div class="itemComment" th:text="${WishGoods.goodsTnm}"></div>
 				</a>
 			</div>
 		</div>

+ 0 - 714
src/main/webapp/WEB-INF/views/web/planning/PlanningDetailForm2Web.html

@@ -1,714 +0,0 @@
-<!DOCTYPE html>
-<html lang="ko" xmlns:th="http://www.thymeleaf.org"
-	xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
-	layout:decorator="web/common/layout/DefaultLayoutWeb">
-<!--
- *******************************************************************************
- * @source  : PlanningDetailFormWeb.html
- * @desc    : 기획전메인 Page
- *============================================================================
- * Pastelmall
- * Copyright(C) 2020 TSIT, All rights reserved.
- *============================================================================
- * VER  DATE         AUTHOR      DESCRIPTION
- * ===  ===========  ==========  =============================================
- * 1.0  2021.3.9     sowon     최초 작성
- *******************************************************************************
- -->
-<body>
-<th:block layout:fragment="content">
-<script src="https://developers.kakao.com/sdk/js/kakao.min.js"></script>
-<div id="container" class="container dp" th:with="frontUrl=${@environment.getProperty('domain.front')}, goodsView=${@environment.getProperty('upload.goods.view')}, planView=${@environment.getProperty('upload.image.view')}">
-		<div class="breadcrumb"> 
-			<ul>
-                <li class="bread_home"><a href="javascript:void(0);"
-						onclick="cfnGoToPage(_PAGE_MAIN);">홈</a></li>
-				<li class="bread_2depth"><a href="javascript:void(0);"
-					onclick="cfnGoToPage(_PAGE_PLANNING_MAIN);">기획전</a></li>
-				<li class="bread_2depth" th:text="${planInfo.planNm}"></li>
-			</ul> 
-		</div>
-		<div class="wrap">
-            <!-- 상단 프로모션 배너 -->
-            <div class="content wide dp_detail_visual">
-                <div class="cont_head">
-                    <div>
-                        <h3 th:text="${planInfo.planNm}"></h4>
-                        <div class="shareSet">
-                            <button class="btn_share" data-name="openShare">공유하기</button>
-                            <!-- toggle contents -->
-                            <div id="layerShare" class="setShare open">
-									<span>
-										<button type="button" class="kk" th:attr="onclick=|cfnSendToKakao('${stylelUrl+'/planning/detail/form?planSq='+planInfo.planSq}', '${planInfo.planNm}', '${planView+ '/'+planInfo.mainImg}');|"><span>카카오톡</span></button>
-										<button type="button" class="fb" th:attr="onclick=|sendSns('facebook', '${stylelUrl+'/planning/detail/form?planSq='+planInfo.planSq}', '${planInfo.planNm}', '', '');|"><span>페이스북</span></button>
-										<button type="button" class="tw" th:attr="onclick=|sendSns('twitter', '${stylelUrl+'/planning/detail/form?planSq='+planInfo.planSq}', '${planInfo.planNm+ '#style24몰'}', '', '');|"><span>트위터</span></button>
-										<button type="button" class="url btn_copy"><span>URL</span></button>
-									</span>
-								</div>
-							</div>
-                        </div>                            
-                    </div>
-                </div>
-                <div class="cont_body">
-                    <!-- 프로모션배너 type1 --> 
-                    <div class="promotion_visual type1" th:if="${fsrcInfoTop != null}" th:utext="${#strings.replace(#strings.replace(fsrcInfoTop.fsrcPc,'&amplt;','<'),'&ampgt;','>')}"></div>
-                    <!-- <div class="promotion_visual type2" th:if="${fsrcInfoTop != null}" th:utext="${#strings.replace(#strings.replace(fsrcInfoTop.fsrcPc,'&amplt;','<'),'&ampgt;','>')}"></div> -->           
-                    <!-- 프로모션배너 type1 -->                    
-                    <!-- 프로모션배너 type2 --> 
-               <!-- <div class="promotion_visual type2">
-                        <div class="swiper-container">
-                            <div class="swiper-wrapper ">
-                                <div class="swiper-slide">
-                                    <img alt="" src="/images/pc/thumb/bigbanner_slide01.png">
-                                </div>
-                                <div class="swiper-slide">
-                                    <img alt="" src="/images/pc/thumb/bigbanner_slide02.png"> 
-                                </div>
-                            </div>
-                        </div>
-                        <div class="swiper-button-prev"></div>
-                        <div class="swiper-button-next"></div>
-                        <div class="swiper-pagination"></div>
-                    </div> -->
-                    <!-- 프로모션배너 type2 -->                    
-                </div>
-            <!-- //상단 프로모션 배너 -->
-            
-            <th:block th:each="a, template : ${templateOrd}">
-				<th:block th:if="${a.tmplType == 'G082_10'}">
-						<div class="content wide dp_review" th:id="${a.tmplType}"></div> <!-- //리뷰 -->
-					</th:block>
-				<th:block th:if="${a.tmplType == 'G082_20'}">
-						 <div class="content wide dp_coupon" th:id="${a.tmplType}"></div>  <!-- //할인쿠폰 -->
-					</th:block>
-				<th:block th:if="${a.tmplType == 'G082_30'}">
-						<div class="content dp_mid_banner" th:id="${a.tmplType}"></div> <!-- //이미지-->
-					</th:block>
-				<th:block th:if="${a.tmplType == 'G082_40'}">
-						<div class="coner_item01" th:id="${a.tmplType}"></div>
-					</th:block>
-				<th:block th:if="${a.tmplType == 'G082_50'}">
-						<div class="content dp_special" th:id="${a.tmplType + a.planContSq}"></div>
-				</th:block>
-				<th:block th:if="${a.tmplType == 'G082_51'}">
-						<div class="content dp_special" th:id="${a.tmplType + a.planContSq}"></div>
-				</th:block>
-				<th:block th:if="${a.tmplType == 'G082_52'}">
-						<div class="content dp_special" th:id="${a.tmplType + a.planContSq}"></div>
-				</th:block>
-			</th:block>
-            
-            <!-- 관련상품 리스트 -->
-			<div class="content sticky_nav_list">
-				<div class="cont_head">
-                    <div class="sticky_nav">
-                        <ul>    
-                        	<th:block th:each="cornerData, CornerStat : ${planCornerList}">
-                            <li><a th:href="${'#brand' +CornerStat.index}" th:text="${cornerData.cornerNm}"></a></li> <!-- 섹션이동 -->
-                            </th:block>
-                        </ul>
-                    </div>
-				</div>
-				<div class="cont_body">
-                    <div class="list_content">
-                    	<th:block th:each="cornerData, CornerStat : ${planCornerList}">
-                        <div th:id="${'brand' +CornerStat.index}">
-                            <div class="item_header"> <!-- 섹션이동 -->
-                                <h4 th:text="${cornerData.cornerNm}"></h4>
-                            </div>
-                            <div class="itemsGrp"> <!-- itemsGrp rank hot deal -->
-                            	<th:block th:each="cornerGoodsData, CornerGoodsStat : ${planCornerGoodsList}" th:if="${cornerGoodsData.cornerNm == cornerData.cornerNm}">
-                       
-                                <div class="item_prod">
-                                    <div class="item_state">
-                                        <button type="button" th:class="${cornerGoodsData.likeIt == 'likeit'}? 'itemLike likeit' : 'itemLike'" onclick="cfnPutWishList(this);" th:attr="goodsCd=${cornerGoodsData.goodsCd}, ithrCd='', contentsLoc='', planDtlSq=''">관심상품 추가</button>
-                                        <a href="javascript:void(0);" th:onclick="cfnGoToGoodsDetail([[${cornerGoodsData.goodsCd}]])" class="itemLink">
-                                            <!-- <div class="rank ranker"><span>1</span></div> -->
-                                            <div class="itemPic">
-                                                <img alt="BLUE-a" class=" vLHTC pd_img" th:src="${goodsView + '/' +cornerGoodsData.sysImgNm}">
-                                            </div>
-                                            <p class="itemBrand" th:text="${cornerGoodsData.brandGroupNm}"></p>
-                                            <div class="itemName" th:text="${cornerGoodsData.goodsNm}"></div>
-                                            <p class="itemPrice">[[${#numbers.formatInteger(cornerGoodsData.currPrice,0,'COMMA')}]]
-                                                <span class="itemPrice_original" th:if="${cornerGoodsData.currPrice != cornerGoodsData.listPrice}" th:text="${#numbers.formatInteger(cornerGoodsData.listPrice,0,'COMMA')}"></span>
-                                                <span class=" itemPercent" th:if="${cornerGoodsData.dcRate != '0'}" th:text="|${#numbers.formatDecimal(cornerGoodsData.dcRate,0,0)}%|"></span>
-                                            </p>
-                                            <div class="itemcolorchip">
-                                                <span class="chip_color35" value="ABM">BEIGE</span>
-                                                <span class="chip_color54" value="BDS">BLACK</span>
-                                                <span class="chip_color40" value="YBR">WHITE</span>
-                                            </div>
-                                            <p class="itemBadge">
-                                                <span class="badge13">베스트 </span>
-                                            </p>
-                                            <div class="itemComment" th:if="${cornerGoodsData.goodsTnm != null}" th:text="${cornerGoodsData.goodsTnm}"></div>
-                                        </a>
-                                    </div>
-                                </div>  
-                                </th:block>          
-                            </div>
-                            </th:block>
-                        </div>                
-                    </div>
-                </div>
-		    </div>
-            <!-- //관련상품 리스트 -->  
-
-            <!-- 다른 기획전 보기 -->
-            <div class="content other_dp_slide">
-                <div class="cont_head">
-                    <div>
-                        <h4>다른 기획전 보기</h4>
-                        <a href="javascript:void(0);" onclick="cfnGoToPage(_PAGE_PLANNING_MAIN);">전체보기</a>
-                    </div>
-                </div>
-                <div class="cont_body">
-                    <div class="swiper-container">
-                        <div class="swiper-wrapper">
-                        	<th:block th:each="PlanData, PlanStat : ${planList}">
-                            <div class="swiper-slide">                   
-                                <a th:onclick="cfnGoToPlanDetail([[${PlanData.planSq}]])">
-                                    <div class="thumb">
-                                        <img th:src="${@environment.getProperty('upload.image.view')+PlanData.mainImg}" alt="${PlanData.planNm}">
-                                    </div>
-                                    <div class="txt">
-                                        <!-- <span class="brand">BUCKAROO</span> -->
-                                        <p class="tit" th:text="${PlanData.planNm}"></p>
-                                    </div>
-                                </a>
-                            </div>
-                            </th:block>   
-                        </div>
-                    </div>
-                    <div class="swiper-button-prev"></div>
-                    <div class="swiper-button-next"></div>
-                </div>
-            </div>
-            <!-- //다른 기획전 보기 -->
-        </div>
-    </div>   
-<div class="modal fade couponInfo_pop" id="couponInfoPop" tabindex="-1" role="dialog" aria-labelledby="couponInfoLabel" aria-hidden="true"></div>
-<script th:inline="javascript">
-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')}]];
-let goodsView =[[${@environment.getProperty('upload.goods.view')}]]
-let imgUrl=[[${@environment.getProperty('upload.image.view')}]];
-
-if(review != null || review != ''){
-	
-	var html = '';
-	
-	html += ' <div class="cont_head">';
-	html += ' 	<div>';
-	html += '		<h4>'+review[0].title+'</h4>';
-	html += ' 	</div>';
-	html += '	<div class="cont_body">';
-	html += ' 		<div class="review_list">';
-	$.each(review, function(idx, item)  {
-		html += '		<div class="reviw_box">'
-		html += '			<div class="best_review">';
-		html += '				<a href="javascript:void();" id="btn_pdBestReview_pop" onclick="fnPlanReviewDetail(\''+item.reviewSq+'\');">';
-		html += '					<div class="pic">';
-		if (item.fileGb == 'M') { 
-			html += '								<span class="thumb mov" style="background-image: url('+ imgUrl +'/'+item.reviewSysImg +');"></span>';	
-		}else{
-			html += '								<span class="thumb" style="background-image: url('+ imgUrl +'/'+item.reviewSysImg +');"></span>';			
-		}
-		html += '                   </div>';
-		html += '                  <div class="star_score">';
-		html += '                      <span class="star">';
-		html += '                          <em class="progbar" style="width:'+(item.score*20)+'%;"></em> <!-- 평점 style로 표기 -->';
-		html += '                      </span>';
-		if(item.bestYn == 'Y'){
-			html += '<em class="ico ico_besttag"></em>';	
-		}
-		html += '                  </div>';
-		html += '                  <div class="txt_best_review">';
-		html += '                      <p>'+item.reviewContent+'</p>';
-		html += '                  </div>';
-		html += '                  <div class="info_writer">';
-		html += '                      <span class="wr_id">'+item.maskingCustId+'</span>';
-		html += '                      <span class="wr_date">'+item.regDt+'</span>';
-		html += '                  </div>';
-		html += '              </a>';
-		html += '          </div>';
-		html += '          <div class="review_item">';
-		html += '              <div class="item_prod">';
-		html += '                  <div class="item_state">';
-		html += '                      <a href="#none" class="itemLink">';
-		html += '                          <div class="itemPic">';
-		html += '                            	<img alt="" class="vLHTC pd_img" src="'+ goodsView +'/'+item.sysImgNm +'">';
-		html += '                          </div>';
-		html += '                          <div class="itemName">'+item.goodsNm+'</div>';
-		html += '                          <p class="itemPrice">'+item.currPrice.addComma()+'</p>';
-		html += '                      </a>';
-		html += '                  </div>';
-		html += '              </div>';
-		html += '          </div>';
-		html += '      </div>  ';
-	});
-	html += '       </div>                    ';
-	html += '	 </div>';
-	html += '</div>';
-
-	$("#G082_10").append(html);
-}
-
-if(image != null || image != ''){
-	var html = '';
-	
-	html += '<div class="cont_body">     ';
-	html += '    <div class="mid_banner">';
-	html += '        <div class="swiper-container">';
-	html += '            <div class="swiper-wrapper">';
-	for (var i = 0; i < image.length; i++) {
-		html += '                	<div class="swiper-slide">';
-		html += '                    	<img alt="" src="'+ imgUrl + image[i].itemVal +'">';
-		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_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(template[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="cont_head">';
-			html += '	<div>';
-			html += '        <h4>';
-			if (template[i].linkUrl != null || template[i].linkUrl != '') { /* 링크 변경 예정 */
-				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 += '		</h4>';
-			html += '    </div>';
-			html += '</div>';
-			html += '<div class="cont_body">';
-			html += '    <div class="dp_listItems_cont type1">';
-			html += '        <ul>';
-		$.each(goods1, function(idx, item)  {
-			if (item.planContSq == template[i].planContSq) {
-				html += '            <li>';
-				html += '                <div class="dp_listItems">';
-				html += '                    <div class="dp_listItems_img">';
-				html += '                        <img src="'+ goodsView +'/'+item.sysImgNm +'" alt="">';
-				html += '                    </div>';
-				html += '                    <div class="dp_listItems_info">';
-				html += '                        <div class="dp_listItems_brand">'+item.brandKnm+'</div>';
-				html += '                        <div class="dp_listItems_name">'+item.goodsNm+'<br></div>';
-				html += '                        <div class="dp_listItems_price">';
-				html += '                            <span class="price">'+item.currPrice.addComma()+'</span>';
-				if (item.currPrice != item.listPrice) {
-					html += '                            <del>'+item.listPrice.addComma()+'</del>';
-					html += '                            <span class="percent">'+Math.floor(item.dcRate)+'%</span>';
-				}
-				html += '                        </div>';
-				html += '                        <div class="itemComment">#주문 폭주 상품</div>';
-				html += '                        <div class="ui_row">';
-				html += '                            <button type="button" class="btn btn_default" onclick="cfnGoToGoodsDetail(\'' + item.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="cont_head">';
-			html += '	<div>';
-			html += '        <h4>';
-				if (template[i].linkUrl != null || template[i].linkUrl != ' ' ||typeof template[i].linkUrl != 'undefined') { /* 링크 변경 예정 */
-					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 += '        </h4>';
-			html += '    </div>';
-			html += '</div>';
-			html += '<div class="cont_body">';
-			html += '    <div class="dp_listItems_cont type2">';
-			html += '        <div class="swiper-container">';
-			html += '            <div class="swiper-wrapper">';
-			$.each(goods2, function(idx, item) {
-				if (item.planContSq == template[i].planContSq) {
-					html += '                <div class="swiper-slide">';
-					html += '                    <div class="item_prod">';
-					html += '                        <div class="item_state">';
-					html += '                            <a onclick="cfnGoToGoodsDetail(\'' + item.goodsCd + '\'" class="itemLink">';
-					html += '                                <div class="itemPic">';
-					html += '                                    <img alt="BLUE-a" class=" vLHTC pd_img" src="'+ goodsView +'/'+item.sysImgNm +'">';
-					html += '                                </div>';
-					html += '                                <p class="itemBrand">'+item.brandKnm+'</p>';
-					html += '                                <div class="itemName">'+item.goodsNm+'</div>';
-					html += '                                <p class="itemPrice">'+item.currPrice.addComma();
-					if (item.currPrice != item.listPrice) {
-						html+='                                    <span class="itemPrice_original">'+item.listPrice.addComma()+'</span>';
-						html+='                                    <span class=" itemPercent">'+Math.floor(item.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();
-		}
-	}
-}
-
-if(goods4 != null || goods4 != ''){
-	var array = [];
-
-	for (var j = 0; j < template.length; j++) {
-		if(template[j].tmplType == 'G082_52'){
-			array.push(template[j].planContSq);
-		}
-	}	
-	for (var i = 0; i < template.length; i++) {
-		var html = '';
-		if(template[i].tmplType == 'G082_52' && array[0] == template[i].planContSq && typeof array[0] != 'undefined'){
-			html += '<div class="cont_head">';
-			html += '<div>';
-			html += '        <h4>';
-			if (template[i].linkUrl != null || template[i].linkUrl != ' ' ||typeof template[i].linkUrl != 'undefined') { /* 링크 변경 예정 */
-				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 += '        </h4>';
-			html += '    </div>';
-			html += '</div>';
-			html += '<div class="cont_body">';
-			html += '    <!-- 상품 노출 4열 type3 -->';
-			html += '    <div class="dp_listItems_cont type3">';
-			html += '        <div class="swiper-container">';
-			html += '            <div class="swiper-wrapper">';
-			$.each(goods4, function(idx, item) {
-				if (item.planContSq == template[i].planContSq) {
-					html += '                <div class="swiper-slide">';
-					html += '                    <div class="item_prod">';
-					html += '                        <div class="item_state">';
-					html += '                            <a onclick="cfnGoToGoodsDetail(\'' + item.goodsCd + '\'" class="itemLink">';
-					html += '                                <div class="itemPic">';
-					html += '                                    <img alt="BLUE-a" class=" vLHTC pd_img" src="'+ goodsView +'/'+item.sysImgNm +'">';
-					html += '                                </div>';
-					html += '                                <p class="itemBrand">'+item.brandKnm+'</p>';
-					html += '                                <div class="itemName">'+item.goodsNm+'</div>';
-					html += '                                <p class="itemPrice">'+item.currPrice.addComma();
-					if (item.currPrice != item.listPrice) {
-						html+='                                    <span class="itemPrice_original">'+item.listPrice.addComma()+'</span>';
-						html+='                                    <span class=" itemPercent">'+Math.floor(item.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_52" +array[0]).append(html);
-			
-		}
-		if($("#G082_52" +template[i].planContSq).length){
-			array.shift();
-		}
-	}
-}
-
-if(coupon != null || coupon != ''){
-	var html = '';
-	 
-	html += '<div class="cont_head">';
-	html += '	<div>';
-	html += '		<h4>'+coupon[0].title+'</h4>';
-	html += '	</div>';
-	html += '</div>';
-	html += '<div class="cont_body">';
-	html += '	<div class="coupon_list">';
-	html += '		<ul>';
-	$.each(coupon, function(idx, item) {
-		html += '			<li>';
-		html += '				<div class="coupon">';
-		html += '					<div>';
-		html += '						<p class="cp_name">'+item.cpnNm+'</p>';
-		html += '						<p class="cp_cont">';
-		if (item.dcWay == '할인율') {
-			html += '							<span> <span><em>'+item.dcPval+'%</em></span>';
-		}else{
-			html += '							<span><em>'+item.dcPval.addComma()+'</em>원</span>'; 
-		}
-		html += '						</p>';
-		html += '						<p class="cp_condition">'+item.buyLimitAmt.addComma()+'원 이상 구매 시 최대 ' +item.maxDcAmt.addComma()+'원 할인';
-
-		if (item.custPubLimitQty != 0) {
-			html += '								<span>1인 최대 '+item.custPubLimitQty+'장</span>';	
-		}
-		html += '						</p>';
-		html += '					</div>';
-		if(typeof item.couponStat != 'undefined'){
-			if (item.couponStat == '쿠폰받기') {
-				html += '					<button type="button" id="coupon_" class="btn btn_dark btn_block btn_coupon_down" onclick="fnPlanCouponDown('+item.cpnId+')">';  /* btn_coupon_done */
-				html += '						<span>쿠폰받기</span>';								/* 받기완료  */
-				html += '					</button>';			
-			}else{
-				html += '					<button type="button"';
-				html += '						class="btn btn_dark btn_block btn_coupon_done" disabled>';  
-				html += '						<span>받기완료</span>';								
-				html += '					</button>';			
-			}
-		}else{
-			html += '					<button type="button" id="coupon_" class="btn btn_dark btn_block btn_coupon_down" onclick="fnPlanCouponDown('+item.cpnId+')">';  /* btn_coupon_done */
-			html += '						<span>쿠폰받기</span>';								/* 받기완료  */
-			html += '					</button>';		
-		}
-		
-		html += '				</div>';
-		html += '				<button type="button" class="btn_underline"	id="btn_couponInfo_pop" onclick="useInfoCoupon('+item.cpnId+')">';
-		html += '					<span>사용안내</span>';
-		html += '				</button>';
-		html += '			</li>';
-	});
-	html += '		</ul>';
-	html += '	</div>';
-	html += '	<div class="announce_txt">';
-	html += '		<div class="note_txt">';
-	html += '			<img src="/images/pc/ico_content_find.png" alt="유의사항">';
-	html += '			<p>유의사항</p>';
-	html += '		</div>';
-	html += '		<div class="announce_list">';
-	html += '			<ul>';
-	html += '				<li>쿠폰 발급 기간 :'+ plan.dispStdt +'~'+ plan.dispEddt +'</li>';
-	html += '				<li>본 쿠폰은 해당 기획전 상품에만 적용 가능합니다.</li>';
-	html += '				<li>본 쿠폰은 해당 기획전 다운로드 버튼을 통해 발급받으실 수 있습니다.</li>';
-	html += '			</ul>';
-	html += '		</div>';
-	html += '	</div>';
-	html += '</div>';
-	html += '</div>';
-		
-	$("#G082_20").append(html);
-}
-
-//사용안내 모달
-var useInfoCoupon = function (id) {
-	 $.ajax( {
-		type		: "GET",
-		url 		: '/mypage/coupon/detailPop?cpnId='+ id,
-		dataType 	: 'html',
-		success 	: function(result) {
-			if (result != null) {
-				$("#couponInfoPop").html(result);
-				$("#couponInfoPop").modal("show");
-			}
-		}
-	});
-	
-	return false; 
-}
-//쿠폰 다운로드
-var fnPlanCouponDown = function(obj){
-
-	if (!cfCheckLogin()) {
-		cfnGoToPage(_PAGE_LOGIN);
-		return false;
-	}
-	
-	let cpnId = obj;
-	gagajf.ajaxJsonSubmit(_PAGE_PLANNING_CPN_DOWNLOAD, JSON.stringify({cpnId: cpnId}), fnPlanCouponCallBack);
-}
-
-// 쿠폰다운로드 콜백
-var fnPlanCouponCallBack = function(result){
-	
-	// 화면 전환 필요		
-}
-
-
-
-$(document).ready( function() {
-
-	//공유 버튼 토글 
-	$("button[data-name=openShare]").on("click", function(){
-		$(this).toggleClass("on").next(".shareWrap").toggleClass("on");
-		return false;
-	});
-	//영역밖 클릭으로 공유토글 닫기
-	$("body").on('click', function(e) { 
-		if(!$(".shareWrap.on").parent().has(e.target).length) {
-			$("button[data-name=openShare]").removeClass("on");
-			$(".shareWrap").removeClass("on");
-		};
-	});
-	
-	$('.btn_copy').bind('click', function() {
-		copyToClipboard();
-	});
-
-	//팝업 - 쿠폰사용안내
-	$(document).on('click','#btn_couponInfo_pop',function(e){
-		$("#couponInfoPop .modal-content").load("popup_couponInfo.html");
-		$("#couponInfoPop").modal("show");
-		return false;
-	});      
-	$("#couponInfoPop_close").click(function() {
-		$.modal.close();
-	});					
-
-    //팝업 - 상품 베스트 리뷰 (detail)
-    $(document).on('click','#btn_pdBestReview_pop, .area_rv_best .best_review a',function(e){
-        $("#pdBestReviewPop .modal-content").load("pd_bestreviewdetail_pop.html");
-        $("#pdBestReviewPop").modal("show");
-        return false;
-    });      
-    $("#pdBestReviewPop_close").click(function() {
-        $.modal.close();
-    });            
-
-    /* SLIDE - 상단 프로모션 배너 */
-/* 	var promotion_visual_slide = new Swiper ('.dp_detail_visual .promotion_visual.type2 .swiper-container', {
-		loop: true,
-		slidesPerView: 1,
-		speed : 1500,
-		navigation: {
-			nextEl: '.promotion_visual.type2 .swiper-button-next',
-			prevEl: '.promotion_visual.type2 .swiper-button-prev',
-		},
-        pagination: {
-			el: '.promotion_visual.type2 .swiper-pagination',
-			clickable: true,
-		},
-	}); */
-
-    /* SLIDE - 중간 배너 */
-	var mid_banner_slide = new Swiper ('.dp_mid_banner .mid_banner .swiper-container', {
-		loop: true,
-		slidesPerView: 1,
-		speed : 1500,
-		navigation: {
-			nextEl: '.mid_banner .swiper-button-next',
-			prevEl: '.mid_banner .swiper-button-prev',
-		},
-        pagination: {
-			el: '.mid_banner .swiper-pagination',
-			clickable: true,
-		},
-	});
-
-    /* SLIDE - 대표상품 슬라이드 2열 상품 */
-    var dp_listItems_slide1 = new Swiper ('.dp_listItems_cont.type2 .swiper-container', {
-        loop: false,
-        slidesPerView: 2,
-        slidesPerGroup: 2,
-        spaceBetween: 20,
-        speed : 800,
-        navigation: {
-            nextEl: '.dp_listItems_cont.type2 .swiper-button-next',
-            prevEl: '.dp_listItems_cont.type2 .swiper-button-prev',
-        },
-        pagination: {
-            el: '.dp_listItems_cont.type2 .swiper-pagination',
-            clickable: true,
-        },
-    });
-
-    /* SLIDE - 대표상품 슬라이드 4열 상품 */
-    var dp_listItems_slide2 = new Swiper ('.dp_listItems_cont.type3 .swiper-container', {
-        loop: false,
-        slidesPerView: 4,
-        slidesPerGroup: 4,
-        spaceBetween: 20,
-        speed : 800,
-        navigation: {
-            nextEl: '.dp_listItems_cont.type3 .swiper-button-next',
-            prevEl: '.dp_listItems_cont.type3 .swiper-button-prev',
-        },
-        pagination: {
-            el: '.dp_listItems_cont.type3 .swiper-pagination',
-            clickable: true,
-        },
-    });
-
-    /* SLIDE - 다른 기획전 보기 */
-    var other_dp_slide_slide = new Swiper ('.other_dp_slide .swiper-container', {
-		slidesPerView: 5,
-        spaceBetween: 20,
-		navigation: {
-			nextEl: '.other_dp_slide .swiper-button-next',
-			prevEl: '.other_dp_slide .swiper-button-prev',
-		},
-	});            
-
-});
-</script>
-</th:block>
-
-</body>
-</html>

+ 569 - 539
src/main/webapp/WEB-INF/views/web/planning/PlanningDetailFormWeb.html

@@ -5,7 +5,7 @@
 <!--
  *******************************************************************************
  * @source  : PlanningDetailFormWeb.html
- * @desc    : 기획전메인 Page
+ * @desc    : 기획전디테일 Page
  *============================================================================
  * Pastelmall
  * Copyright(C) 2020 TSIT, All rights reserved.
@@ -16,218 +16,178 @@
  *******************************************************************************
  -->
 <body>
-	<th:block layout:fragment="content">
-	<script src="https://developers.kakao.com/sdk/js/kakao.min.js"></script>
-		<!--  container -->
-		<div id="container" class="container dp" th:with="frontUrl=${@environment.getProperty('domain.front')}, goodsView=${@environment.getProperty('upload.goods.view')}, planView=${@environment.getProperty('upload.image.view')}">
-			<div class="breadcrumb">
-				<ul>
-					<li class="bread_home"><a href="javascript:void(0);"
+<th:block layout:fragment="content">
+<script src="https://developers.kakao.com/sdk/js/kakao.min.js"></script>
+<div id="container" class="container dp" th:with="frontUrl=${@environment.getProperty('domain.front')}, goodsView=${@environment.getProperty('upload.goods.view')}, planView=${@environment.getProperty('upload.image.view')}">
+		<div class="breadcrumb"> 
+			<ul>
+                <li class="bread_home"><a href="javascript:void(0);"
 						onclick="cfnGoToPage(_PAGE_MAIN);">홈</a></li>
-					<li class="bread_2depth"><a href="javascript:void(0);"
-						onclick="cfnGoToPage(_PAGE_PLANNING_MAIN);">기획전</a></li>
-					<li class="bread_2depth" th:text="${planInfo.planNm}"></li>
-				</ul>
-			</div>
-			<div class="wrap">
-				<div class="content wide dp_detail_case1">
-					<!-- 풀사이즈 -->
-					<div class="cont_head">
-						<div>
-							<h3 th:text="${planInfo.planNm}"></h3>
-							<div>
-								<div class="shareSet">
-										<button class="btn_share" data-name="openShare">공유하기</button>
-										<div class="shareWrap" th:with="stylelUrl=${@environment.getProperty('domain.front')}, imgGoodsUrl=${@environment.getProperty('upload.goods.view')}">
-										<div id="layerShare" class="setShare open">
-											<span>
-												<button type="button" class="kk" th:attr="onclick=|cfnSendToKakao('${stylelUrl+'/planning/detail/form?planSq='+planInfo.planSq}', '${planInfo.planNm}', '${planView+ '/'+planInfo.mainImg}');|"><span>카카오톡</span></button>
-												<button type="button" class="fb" th:attr="onclick=|sendSns('facebook', '${stylelUrl+'/planning/detail/form?planSq='+planInfo.planSq}', '${planInfo.planNm}', '', '');|"><span>페이스북</span></button>
-												<button type="button" class="tw" th:attr="onclick=|sendSns('twitter', '${stylelUrl+'/planning/detail/form?planSq='+planInfo.planSq}', '${planInfo.planNm+ '#style24몰'}', '', '');|"><span>트위터</span></button>
-												<button type="button" class="url btn_copy"><span>URL</span></button>
-											</span>
-										</div>
-									</div>
+				<li class="bread_2depth"><a href="javascript:void(0);"
+					onclick="cfnGoToPage(_PAGE_PLANNING_MAIN);">기획전</a></li>
+				<li class="bread_2depth" th:text="${planInfo.planNm}"></li>
+			</ul> 
+		</div>
+		<div class="wrap">
+            <!-- 상단 프로모션 배너 -->
+            <div class="content wide dp_detail_visual">
+                <div class="cont_head">
+                    <div>
+                        <h3 th:text="${planInfo.planNm}"></h4>
+                        <div class="shareSet">
+                            <button class="btn_share" data-name="openShare">공유하기</button>
+                            <!-- toggle contents -->
+                            <div id="layerShare" class="setShare open">
+									<span>
+										<button type="button" class="kk" th:attr="onclick=|cfnSendToKakao('${stylelUrl+'/planning/detail/form?planSq='+planInfo.planSq}', '${planInfo.planNm}', '${planView+ '/'+planInfo.mainImg}');|"><span>카카오톡</span></button>
+										<button type="button" class="fb" th:attr="onclick=|sendSns('facebook', '${stylelUrl+'/planning/detail/form?planSq='+planInfo.planSq}', '${planInfo.planNm}', '', '');|"><span>페이스북</span></button>
+										<button type="button" class="tw" th:attr="onclick=|sendSns('twitter', '${stylelUrl+'/planning/detail/form?planSq='+planInfo.planSq}', '${planInfo.planNm+ '#style24몰'}', '', '');|"><span>트위터</span></button>
+										<button type="button" class="url btn_copy"><span>URL</span></button>
+									</span>
 								</div>
 							</div>
-						</div>
-					</div>
-					<div class="cont_body">
-				
-						<div class="coner_content">
-							<div class="coner_front">
-								<div class="promotion_visual" th:if="${fsrcInfoTop != null}" th:utext="${fsrcInfoTop.fsrcPc}"></div>
-								<!-- 상단배너 -->
-							</div>
-							<th:block th:each="a, template : ${templateOrd}">
-							<th:block th:if="${a.tmplType == 'G082_10'}">
-									<div class="coner_item01" th:id="${a.tmplType}"></div>
-								</th:block>
-							<th:block th:if="${a.tmplType == 'G082_20'}">
-									<div class="coner_item01" th:id="${a.tmplType}"></div>
-								</th:block>
-							<th:block th:if="${a.tmplType == 'G082_30'}">
-									<div class="coner_item01" th:id="${a.tmplType}"></div>
-								</th:block>
-							<th:block th:if="${a.tmplType == 'G082_40'}">
-									<div class="coner_item01" th:id="${a.tmplType}"></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>
-								<!-- 하단배너 -->
-							</div>
-							<br> <br>
-						</div>
-					</div>
+                        </div>                            
+                    </div>
+                </div>
+                <div class="cont_body">
+                    <!-- 프로모션배너 type1 --> 
+                    <div class="promotion_visual type1" th:if="${fsrcInfoTop != null}" th:utext="${#strings.replace(#strings.replace(fsrcInfoTop.fsrcPc,'&amplt;','<'),'&ampgt;','>')}"></div>
+                    <!-- <div class="promotion_visual type2" th:if="${fsrcInfoTop != null}" th:utext="${#strings.replace(#strings.replace(fsrcInfoTop.fsrcPc,'&amplt;','<'),'&ampgt;','>')}"></div> -->           
+                    <!-- 프로모션배너 type1 -->                    
+                    <!-- 프로모션배너 type2 --> 
+               <!-- <div class="promotion_visual type2">
+                        <div class="swiper-container">
+                            <div class="swiper-wrapper ">
+                                <div class="swiper-slide">
+                                    <img alt="" src="/images/pc/thumb/bigbanner_slide01.png">
+                                </div>
+                                <div class="swiper-slide">
+                                    <img alt="" src="/images/pc/thumb/bigbanner_slide02.png"> 
+                                </div>
+                            </div>
+                        </div>
+                        <div class="swiper-button-prev"></div>
+                        <div class="swiper-button-next"></div>
+                        <div class="swiper-pagination"></div>
+                    </div> -->
+                    <!-- 프로모션배너 type2 -->                    
+                </div>
+            <!-- //상단 프로모션 배너 -->
+            
+            <th:block th:each="a, template : ${templateOrd}">
+				<th:block th:if="${a.tmplType == 'G082_10'}">
+						<div class="content wide dp_review" th:id="${a.tmplType}"></div> <!-- //리뷰 -->
+					</th:block>
+				<th:block th:if="${a.tmplType == 'G082_20'}">
+						 <div class="content wide dp_coupon" th:id="${a.tmplType}"></div>  <!-- //할인쿠폰 -->
+					</th:block>
+				<th:block th:if="${a.tmplType == 'G082_30'}">
+						<div class="content dp_mid_banner" th:id="${a.tmplType}"></div> <!-- //이미지-->
+					</th:block>
+				<th:block th:if="${a.tmplType == 'G082_40'}">
+						<div class="coner_item01" th:id="${a.tmplType}"></div>
+					</th:block>
+				<th:block th:if="${a.tmplType == 'G082_50'}">
+						<div class="content dp_special" th:id="${a.tmplType + a.planContSq}"></div>
+				</th:block>
+				<th:block th:if="${a.tmplType == 'G082_51'}">
+						<div class="content dp_special" th:id="${a.tmplType + a.planContSq}"></div>
+				</th:block>
+				<th:block th:if="${a.tmplType == 'G082_52'}">
+						<div class="content dp_special" th:id="${a.tmplType + a.planContSq}"></div>
+				</th:block>
+			</th:block>
+            
+            <!-- 관련상품 리스트 -->
+			<div class="content sticky_nav_list">
+				<div class="cont_head">
+                    <div class="sticky_nav">
+                        <ul>    
+                        	<th:block th:each="cornerData, CornerStat : ${planCornerList}">
+                            <li><a th:href="${'#brand' +CornerStat.index}" th:text="${cornerData.cornerNm}"></a></li> <!-- 섹션이동 -->
+                            </th:block>
+                        </ul>
+                    </div>
 				</div>
-				<!-- //풀사이즈 -->
-				<div class="content dp_detail_list">
-					<div class="cont_head">
-						<div class="bullet_sticky_nav">
-							<ul>
-								<li><a href="#brand01">모이몰른</a></li>
-								<!-- 섹션이동 -->
-								<li><a href="#brand02">컬리수</a></li>
+				<div class="cont_body">
+                    <div class="list_content">
+                    	<th:block th:each="cornerData, CornerStat : ${planCornerList}">
+                        <div th:id="${'brand' +CornerStat.index}">
+                            <div class="item_header"> <!-- 섹션이동 -->
+                                <h4 th:text="${cornerData.cornerNm}"></h4>
+                            </div>
+                            <div class="itemsGrp"> <!-- itemsGrp rank hot deal -->
+                            	<th:block th:each="cornerGoodsData, CornerGoodsStat : ${planCornerGoodsList}" th:if="${cornerGoodsData.cornerNm == cornerData.cornerNm}">
+                       
+                                <div class="item_prod">
+                                    <div class="item_state">
+                                        <button type="button" th:class="${cornerGoodsData.likeIt == 'likeit'}? 'itemLike likeit' : 'itemLike'" onclick="cfnPutWishList(this);" th:attr="goodsCd=${cornerGoodsData.goodsCd}, ithrCd='', contentsLoc='', planDtlSq=''">관심상품 추가</button>
+                                        <a href="javascript:void(0);" th:onclick="cfnGoToGoodsDetail([[${cornerGoodsData.goodsCd}]])" class="itemLink">
+                                            <!-- <div class="rank ranker"><span>1</span></div> -->
+                                            <div class="itemPic">
+                                                <img alt="BLUE-a" class=" vLHTC pd_img" th:src="${goodsView + '/' +cornerGoodsData.sysImgNm}">
+                                            </div>
+                                            <p class="itemBrand" th:text="${cornerGoodsData.brandGroupNm}"></p>
+                                            <div class="itemName" th:text="${cornerGoodsData.goodsNm}"></div>
+                                            <p class="itemPrice">[[${#numbers.formatInteger(cornerGoodsData.currPrice,0,'COMMA')}]]
+                                                <span class="itemPrice_original" th:if="${cornerGoodsData.currPrice != cornerGoodsData.listPrice}" th:text="${#numbers.formatInteger(cornerGoodsData.listPrice,0,'COMMA')}"></span>
+                                                <span class=" itemPercent" th:if="${cornerGoodsData.dcRate != '0'}" th:text="|${#numbers.formatDecimal(cornerGoodsData.dcRate,0,0)}%|"></span>
+                                            </p>
+                                            <div class="itemcolorchip">
+                                                <span class="chip_color35" value="ABM">BEIGE</span>
+                                                <span class="chip_color54" value="BDS">BLACK</span>
+                                                <span class="chip_color40" value="YBR">WHITE</span>
+                                            </div>
+                                            <p class="itemBadge">
+                                                <span class="badge13">베스트 </span>
+                                            </p>
+                                            <div class="itemComment" th:if="${cornerGoodsData.goodsTnm != null}" th:text="${cornerGoodsData.goodsTnm}"></div>
+                                        </a>
+                                    </div>
+                                </div>  
+                                </th:block>          
+                            </div>
+                            </th:block>
+                        </div>                
+                    </div>
+                </div>
+		    </div>
+            <!-- //관련상품 리스트 -->  
 
-							</ul>
-						</div>
-					</div>
-					<div class="cont_body">
-						<div class="list_content">
-							<div id="brand01">
-								<div class="item_header">
-									<!-- 섹션이동 -->
-									<h4>모이몰른</h4>
-								</div>
-								<div class="itemsGrp">
-									<!-- itemsGrp rank hot deal -->
-									<div class=" item_prod">
-										<!-- item_prod ranker d_detail -->
-										<div class="item_state">
-											<!-- item_state AD soldout -->
-											<a href="#none" class="itemLink">
-												<div class=" itemPic">
-													<img alt="BLUE-a" class=" vLHTC pd_img"
-														src="/images/pc/thumb/prod1.jpg">
-													<button type="button" class="itemLike likeit">관심상품
-														추가</button>
-												</div>
-												<p class="itemBrand">BRAND NAME</p>
-
-												<div class=" itemName">남성 헤링본 기모 팬츠 헤링본 기모 팬츠</div>
-												<p class="itemPrice">
-													488,000
-													<!-- -->
-													원
-												</p>
-												<p class="itemBadge">
-													<span class="badge13">베스트 </span>
-												</p>
-												<div class="itemcolorchip">
-													<span class="chip_color35" value="ABM">BEIGE</span> <span
-														class="chip_color54" value="BDS">BLACK</span> <span
-														class="chip_color40" value="YBR">WHITE</span>
-												</div>
-												<div class="itemComment">#주문 폭주 상품</div>
-											</a>
-										</div>
-									</div>
-								</div>
-							</div>
-							<div id="brand02">
-								<div class="item_header">
-									<!-- 섹션이동 -->
-									<h4>컬리수</h4>
-								</div>
-								<div class="itemsGrp">
-									<!-- itemsGrp rank hot deal -->
-									<div class=" item_prod">
-										<!-- item_prod ranker d_detail -->
-										<div class="item_state">
-											<!-- item_state AD soldout -->
-											<a href="#none" class="itemLink">
-												<div class=" itemPic">
-													<img alt="BLUE-a" class=" vLHTC pd_img"
-														src="/images/pc/thumb/prod1.jpg">
-													<button type="button" class="itemLike likeit">관심상품
-														추가</button>
-												</div>
-												<p class="itemBrand">BRAND NAME</p>
-
-												<div class=" itemName">남성 헤링본 기모 팬츠 헤링본 기모 팬츠</div>
-												<p class="itemPrice">
-													488,000
-													<!-- -->
-													원
-												</p>
-												<p class="itemBadge">
-													<span class="badge13">베스트 </span>
-												</p>
-												<div class="itemcolorchip">
-													<span class="chip_color35" value="ABM">BEIGE</span> <span
-														class="chip_color54" value="BDS">BLACK</span> <span
-														class="chip_color40" value="YBR">WHITE</span>
-												</div>
-												<div class="itemComment">#주문 폭주 상품</div>
-											</a>
-										</div>
-									</div>
-								</div>
-							</div>
-						</div>
-					</div>
-				</div>
-				<th:block th:if="${planCount > 0}">
-				<div class="content dp_foot_banner">
-					<div class="cont_head">
-						<div>
-							<p>다른 기획전 보기</p>
-							<a href="javascript:void(0);" onclick="cfnGoToPage(_PAGE_PLANNING_MAIN);">전체보기</a>
-						</div>
-					</div>
-					<div class="cont_body">
-						<div class="foot_banner_slide">
-							<div class="swiper-container">
-								<div class="swiper-wrapper">
-								 <th:block th:each="PlanData, PlanStat : ${planList}">
-									<div class="swiper-slide">
-										<a th:onclick="cfnGoToPlanDetail([[${PlanData.planSq}]])">
-											<div class="thumb">
-												<img th:src="${@environment.getProperty('upload.image.view')+PlanData.mainImg}" alt="${PlanData.planNm}">
-											</div>
-											<div class="txt">
-												<!-- <span class="brand" th:if="${PlanData.cnt > 1}" th:text="${PlanData.brand}+' 외'"></span> -->
-												<p class="tit" th:text="${PlanData.planNm}"></p>
-											</div>
-										</a>
-									</div>
-								</th:block>
-								</div>
-							</div>
-							<div class="swiper-button-prev"></div>
-							<div class="swiper-button-next"></div>
-						</div>
-					</div>
-				</div>
-				</th:block>
-			</div>
-		</div>
-		
-	<div class="modal fade dp_coupon_pop"  id="coupon_modal_02" tabindex="-1" role="dialog"	aria-labelledby="PopupBasicLabel" aria-hidden="true"></div>
-		<!-- // container -->
+            <!-- 다른 기획전 보기 -->
+            <div class="content other_dp_slide">
+                <div class="cont_head">
+                    <div>
+                        <h4>다른 기획전 보기</h4>
+                        <a href="javascript:void(0);" onclick="cfnGoToPage(_PAGE_PLANNING_MAIN);">전체보기</a>
+                    </div>
+                </div>
+                <div class="cont_body">
+                    <div class="swiper-container">
+                        <div class="swiper-wrapper">
+                        	<th:block th:each="PlanData, PlanStat : ${planList}">
+                            <div class="swiper-slide">                   
+                                <a th:onclick="cfnGoToPlanDetail([[${PlanData.planSq}]])">
+                                    <div class="thumb">
+                                        <img th:src="${@environment.getProperty('upload.image.view')+PlanData.mainImg}" alt="${PlanData.planNm}">
+                                    </div>
+                                    <div class="txt">
+                                        <!-- <span class="brand">BUCKAROO</span> -->
+                                        <p class="tit" th:text="${PlanData.planNm}"></p>
+                                    </div>
+                                </a>
+                            </div>
+                            </th:block>   
+                        </div>
+                    </div>
+                    <div class="swiper-button-prev"></div>
+                    <div class="swiper-button-next"></div>
+                </div>
+            </div>
+            <!-- //다른 기획전 보기 -->
+        </div>
+    </div>   
+<div class="modal fade couponInfo_pop" id="couponInfoPop" tabindex="-1" role="dialog" aria-labelledby="couponInfoLabel" aria-hidden="true"></div>
 <script th:inline="javascript">
 let review = [[${reviewInfo}]];
 let coupon = [[${couponInfo}]];
@@ -242,168 +202,85 @@ let goodsView =[[${@environment.getProperty('upload.goods.view')}]]
 let imgUrl=[[${@environment.getProperty('upload.image.view')}]];
 
 if(review != null || review != ''){
-		
-	var html = '';
-	
-	
-	html += '<div class="dp_review_cont">';
-	html += '	<div class="dp_review">';
-	html += '		<h2 class="dp_subtitle">'+review[0].title+'</h2>';
-	html += '		<div class="review_list">';
 	
+	var html = '';
 	
+	html += ' <div class="cont_head">';
+	html += ' 	<div>';
+	html += '		<h4>'+review[0].title+'</h4>';
+	html += ' 	</div>';
+	html += '	<div class="cont_body">';
+	html += ' 		<div class="review_list">';
 	$.each(review, function(idx, item)  {
-		html += '			<div>';
-		html += '				<div class="best_review">';
-		html += '					<a href="javascript:void();" onclick="fnPlanReviewDetail(\''+item.reviewSq+'\');">';
-		html += '						<div class="lap">';
-		html += '							<div class="pic">';
+		html += '		<div class="reviw_box">'
+		html += '			<div class="best_review">';
+		html += '				<a href="javascript:void();" id="btn_pdBestReview_pop" onclick="cfGoodsReviewDetail(\''+item.goodsCd+'\',\'\', \'Y\',\''+item.reviewSq+'\');">';
+		html += '					<div class="pic">';
 		if (item.fileGb == 'M') { 
 			html += '								<span class="thumb mov" style="background-image: url('+ imgUrl +'/'+item.reviewSysImg +');"></span>';	
 		}else{
 			html += '								<span class="thumb" style="background-image: url('+ imgUrl +'/'+item.reviewSysImg +');"></span>';			
 		}
-		html += '							</div>';
-		html += '							<div class="info">';
-		html += '								<div>';
-		html += '									<div class="star_score">';
-		html += '										<span class="star"> <em class="progbar"';
-		html += '											style="width:'+(item.score*20)+'%;"></em> <!-- 평점 style로 표기 -->';
-		html += '										</span>'; 
+		html += '                   </div>';
+		html += '                  <div class="star_score">';
+		html += '                      <span class="star">';
+		html += '                          <em class="progbar" style="width:'+(item.score*20)+'%;"></em> <!-- 평점 style로 표기 -->';
+		html += '                      </span>';
 		if(item.bestYn == 'Y'){
 			html += '<em class="ico ico_besttag"></em>';	
 		}
-		html += '									</div>';
-		html += '									<div class="txt_best_review">';
-		html += '										<p>'+item.reviewContent+'</p>';
-		html += '									</div>';
-		html += '									<div class="writer">';
-		html += '										<span class="wr_id">'+item.maskingCustId+'</span><span';
-		html += '											class="wr_date">'+item.regDt+'</span>';
-		html += '									</div>';
-		html += '								</div>';
-		html += '							</div>';
-		html += '						</div>';
-		html += '					</a>';
-		html += '				</div>';
-		html += '				<div class="product_view">';
-		html += '					<div class="item_prod">';
-		html += '						<div class="item_state">';
-		html += '							<a href="#none" class="itemLink">';
-		html += '								<div class="itemPic">';
-		html += '									<img alt="" class="vLHTC pd_img" src="'+ _imgUrl +'/'+item.sysImgNm +'">';
-		html += '								</div>';
-		html += '								<div class="itemName">'+item.goodsNm+'</div>';
-		html += '								<p class="itemPrice">'+item.currPrice.addComma()+'원</p>';
-		html += '							</a>';
-		html += '						</div>';
-		html += '					</div>';
-		html += '				</div>';
-		html += '			</div>';
+		html += '                  </div>';
+		html += '                  <div class="txt_best_review">';
+		html += '                      <p>'+item.reviewContent+'</p>';
+		html += '                  </div>';
+		html += '                  <div class="info_writer">';
+		html += '                      <span class="wr_id">'+item.maskingCustId+'</span>';
+		html += '                      <span class="wr_date">'+item.regDt+'</span>';
+		html += '                  </div>';
+		html += '              </a>';
+		html += '          </div>';
+		html += '          <div class="review_item">';
+		html += '              <div class="item_prod">';
+		html += '                  <div class="item_state">';
+		html += '                      <a href="javascript:void(0)" onclick="cfnGoToGoodsDetail(\'' + item.goodsCd + '\')" class="itemLink">';
+		html += '                          <div class="itemPic">';
+		html += '                            	<img alt="" class="vLHTC pd_img" src="'+ goodsView +'/'+item.sysImgNm +'">';
+		html += '                          </div>';
+		html += '                          <div class="itemName">'+item.goodsNm+'</div>';
+		html += '                          <p class="itemPrice">'+item.currPrice.addComma()+'</p>';
+		html += '                      </a>';
+		html += '                  </div>';
+		html += '              </div>';
+		html += '          </div>';
+		html += '      </div>  ';
 	});
-	html += '			</div>';
-	html += '		</div>';
-	html += '	</div>';
+	html += '       </div>                    ';
+	html += '	 </div>';
 	html += '</div>';
-	
-	$("#G082_10").append(html);
-}
 
-if(coupon != null || coupon != ''){
-	var html = '';
-	 
-	html += '<div class="coner_item02">';
-	html += '	<div class="dp_coupon_wrap">';
-	html += '	<div>';
-	html += '		<p>'+coupon[0].title+'</p>';
-	html += '	</div>';
-	html += '	<div class="coupon_list inner">';
-	html += '		<ul class="clear">';
-	$.each(coupon, function(idx, item) {
-		html += '			<li>';
-		html += '				<div class="coupon">';
-		html += '					<div>';
-		html += '						<p class="cp_name">'+item.cpnNm+'</p>';
-		html += '						<p class="cp_cont">';
-		if (item.dcWay == '할인율') {
-			html += '							<span> <span><em>'+item.dcPval+'%</em></span>';
-		}else{
-			html += '							<span><em>'+item.dcPval.addComma()+'</em>원</span>'; 
-		}
-		html += '						</p>';
-		html += '						<p class="cp_condition">'+item.buyLimitAmt.addComma()+'원 이상 구매 시 최대 ' +item.maxDcAmt.addComma()+'원 할인';
-
-		if (item.custPubLimitQty != 0) {
-			html += '								<span>1인 최대 '+item.custPubLimitQty+'장</span>';	
-		}
-		
-		html += '						</p>';
-		html += '					</div>';
-		if(typeof item.couponStat != 'undefined'){
-			if (item.couponStat == '쿠폰받기') {
-				html += '					<button type="button" id="coupon_" class="btn btn_dark btn_block btn_coupon_down" onclick="fnPlanCouponDown('+item.cpnId+')">';  /* btn_coupon_done */
-				html += '						<span>쿠폰받기</span>';								/* 받기완료  */
-				html += '					</button>';			
-			}else{
-				html += '					<button type="button"';
-				html += '						class="btn btn_dark btn_block btn_coupon_done" disabled>';  
-				html += '						<span>받기완료</span>';								
-				html += '					</button>';			
-			}
-		}else{
-			html += '					<button type="button" id="coupon_" class="btn btn_dark btn_block btn_coupon_down" onclick="fnPlanCouponDown('+item.cpnId+')">';  /* btn_coupon_done */
-			html += '						<span>쿠폰받기</span>';								/* 받기완료  */
-			html += '					</button>';		
-		}
-		
-		html += '				</div>';
-		html += '				<button type="button" class="btn_underline"	id="btn_cpinfo_pop" onclick="useInfoCoupon('+item.cpnId+')">';
-		html += '					<span>사용안내</span>';
-		html += '				</button>';
-		html += '			</li>';
-	});
-	html += '		</ul>';
-	html += '	</div>';
-	html += '	<div class="announce_txt inner">';
-	html += '		<div class="note_txt">';
-	html += '			<img src="/images/pc/ico_content_find.png" alt="유의사항">';
-	html += '			<p>유의사항</p>';
-	html += '		</div>';
-	html += '		<div class="announce_list">';
-	html += '			<ul>';
-	html += '				<li>쿠폰 발급 기간 :'+ plan.dispStdt +'~'+ plan.dispEddt +'</li>';
-	html += '				<li>본 쿠폰은 해당 기획전 상품에만 적용 가능합니다.</li>';
-	html += '				<li>본 쿠폰은 해당 기획전 다운로드 버튼을 통해 발급받으실 수 있습니다.</li>';
-	html += '			</ul>';
-	html += '		</div>';
-	html += '	</div>';
-	html += '	<br>';
-	html += '	<br>';
-	html += '</div>';
-	html += '</div>';
-		
-	$("#G082_20").append(html);
+	$("#G082_10").append(html);
 }
 
 if(image != null || image != ''){
 	var html = '';
 	
-	html += '	<div class="coner_item02">';
-	html += '    	<div class="coner_visual">';
-	html += '        	<div class="swiper-container">';
-	html += '            	<div class="swiper-wrapper ">';
-	
+	html += '<div class="cont_body">     ';
+	html += '    <div class="mid_banner">';
+	html += '        <div class="swiper-container">';
+	html += '            <div class="swiper-wrapper">';
 	for (var i = 0; i < image.length; i++) {
 		html += '                	<div class="swiper-slide">';
 		html += '                    	<img alt="" src="'+ imgUrl + image[i].itemVal +'">';
 		html += '                	</div>';
 	}
-	html += '            	</div>';
-	html += '            	<div class="swiper-button-prev "></div>';
-	html += '            	<div class="swiper-button-next "></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>';
+	html += '</div>';
+	
 	
 	$("#G082_30").append(html);
 }
@@ -420,130 +297,270 @@ if(goods1 != null || goods1 != ''){
 	
 	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].tmplType == 'G082_50' && array[0] == template[i].planContSq && typeof array[0] != 'undefined') {
+			html += '<div class="cont_head">';
+			html += '	<div>';
+			html += '        <h4>';
 			if (template[i].linkUrl != null || template[i].linkUrl != '') { /* 링크 변경 예정 */
 				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 += '		</h4>';
 			html += '    </div>';
-			html += '    <div class="dp_listItems_cont">';
+			html += '</div>';
+			html += '<div class="cont_body">';
+			html += '    <div class="dp_listItems_cont type1">';
 			html += '        <ul>';
-			
-			$.each(goods1, function(idx, item)  {
+		$.each(goods1, function(idx, item)  {
+			if (item.planContSq == template[i].planContSq) {
+				html += '            <li>';
+				html += '                <div class="dp_listItems">';
+				html += '                    <div class="dp_listItems_img">';
+				html += '                        <img src="'+ goodsView +'/'+item.sysImgNm +'" alt="">';
+				html += '                    </div>';
+				html += '                    <div class="dp_listItems_info">';
+				html += '                        <div class="dp_listItems_brand">'+item.brandGroupNm+'</div>';
+				html += '                        <div class="dp_listItems_name">'+item.goodsNm+'<br></div>';
+				html += '                        <div class="dp_listItems_price">';
+				html += '                            <span class="price">'+item.currPrice.addComma()+'</span>';
+				if (item.currPrice != item.listPrice) {
+					html += '                            <del>'+item.listPrice.addComma()+'</del>';
+					html += '                            <span class="percent">'+Math.floor(item.dcRate)+'%</span>';
+				}
+				html += '                        </div>';
+				if(item.goodsTnm != null){
+					html += '                        <div class="itemComment">'+item.goodsTnm+'</div>';
+				}
+				html += '                        <div class="ui_row">';
+				html += '                            <button type="button" class="btn btn_default" onclick="cfnGoToGoodsDetail(\'' + item.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="cont_head">';
+			html += '	<div>';
+			html += '        <h4>';
+				if (template[i].linkUrl != null || template[i].linkUrl != ' ' ||typeof template[i].linkUrl != 'undefined') { /* 링크 변경 예정 */
+					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 += '        </h4>';
+			html += '    </div>';
+			html += '</div>';
+			html += '<div class="cont_body">';
+			html += '    <div class="dp_listItems_cont type2">';
+			html += '        <div class="swiper-container">';
+			html += '            <div class="swiper-wrapper">';
+			$.each(goods2, function(idx, item) {
 				if (item.planContSq == template[i].planContSq) {
-					html += '            <li>';
-					html += '                <div class="dp_listItems">';
-					html += '                    <div class="dp_listItems_img">';
-					html += '                        <img src="'+ goodsView +'/'+item.sysImgNm +'" alt="">';
-					html += '                    </div>';
-					html += '                    <div class="dp_listItems_info">';
-					html += '                        <div class="dp_listItems_brand">'+item.brandKnm+'</div>';
-					html += '                        <div class="dp_listItems_name">'+item.goodsNm+'</div>';
-					html += '                        <div class="dp_listItems_price">';
-					html += '                            <span class="price">'+item.currPrice.addComma()+'</span>';
+					html += '                <div class="swiper-slide">';
+					html += '                    <div class="item_prod">';
+					html += '                        <div class="item_state">';
+					html += '                            <a onclick="cfnGoToGoodsDetail(\'' + item.goodsCd + '\')" class="itemLink">';
+					html += '                                <div class="itemPic">';
+					html += '                                    <img alt="BLUE-a" class=" vLHTC pd_img" src="'+ goodsView +'/'+item.sysImgNm +'">';
+					html += '                                </div>';
+					html += '                                <p class="itemBrand">'+item.brandGroupNm+'</p>';
+					html += '                                <div class="itemName">'+item.goodsNm+'</div>';
+					html += '                                <p class="itemPrice">'+item.currPrice.addComma();
 					if (item.currPrice != item.listPrice) {
-						html += '                            <del>'+item.listPrice.addComma()+'</del>';
-						html += '                            <span class="percent">'+Math.floor(item.dcRate)+'%</span>';
+						html+='                                    <span class="itemPrice_original">'+item.listPrice.addComma()+'</span>';
+						html+='                                    <span class=" itemPercent">'+Math.floor(item.dcRate)+'%</span>';
 					}
-					
-					html += '                        </div>';
-					//html += '                        <div class="itemComment">#주문 폭주 상품</div>';
-					html += '                        <div class="ui_row">';
-					html += '                            <button type="button" class="btn btn_default" onclick="cfnGoToGoodsDetail(\'' + item.goodsCd + '\'"><span>자세히 보기</span></button>';
+					html += '                                </p>';
+					if(item.goodsTnm != null){
+						html += '                        <div class="itemComment">'+item.goodsTnm+'</div>';
+					}
+					html += '                            </a>';
 					html += '                        </div>';
 					html += '                    </div>';
-					html += '                </div>';
-					html += '            </li>';
-						
+					html += '                </div>           ';
 				}
 			});
-			html += '        </ul>';
-			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_50" +array[0]).append(html);
+			$("#G082_51" +array[0]).append(html);
 		}
 		
-		if($("#G082_50" +template[i].planContSq).length){
+		if($("#G082_51" +template[i].planContSq).length){
 			array.shift();
 		}
 	}
-
 }
-	
-if(goods2 != null || goods2 != ''){
+
+if(goods4 != null || goods4 != ''){
 	var array = [];
 
 	for (var j = 0; j < template.length; j++) {
-		if(template[j].tmplType == 'G082_51'){
+		if(template[j].tmplType == 'G082_52'){
 			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">';
-			console.log(template[i].linkUrl);
+		if(template[i].tmplType == 'G082_52' && array[0] == template[i].planContSq && typeof array[0] != 'undefined'){
+			html += '<div class="cont_head">';
+			html += '<div>';
+			html += '        <h4>';
 			if (template[i].linkUrl != null || template[i].linkUrl != ' ' ||typeof template[i].linkUrl != 'undefined') { /* 링크 변경 예정 */
 				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 ">';
-			
-			$.each(goods2, function(idx, item) {
+			html += '        </h4>';
+			html += '    </div>';
+			html += '</div>';
+			html += '<div class="cont_body">';
+			html += '    <!-- 상품 노출 4열 type3 -->';
+			html += '    <div class="dp_listItems_cont type3">';
+			html += '        <div class="swiper-container">';
+			html += '            <div class="swiper-wrapper">';
+			$.each(goods4, function(idx, item) {
 				if (item.planContSq == template[i].planContSq) {
-					html+='                <div class="swiper-slide">';
-					html+='                    <div class="item_prod">';
-					html+='                        <div class="item_state">';
-					html+='                            <a onclick="cfnGoToGoodsDetail(\'' + item.goodsCd + '\'" class="itemLink">';
-					html+='                                <div class="itemPic">';
-					html+='                                    <img alt="BLUE-a" class=" vLHTC pd_img" src="'+ goodsView +'/'+item.sysImgNm +'">';
-					html+='                                </div>';
-					html+='                                <p class="itemBrand">'+item.brandKnm+'</p>';
-					html+='                                <div class="itemName">'+item.goodsNm+'</div>';
-					html+='                               <p class="itemPrice">'+item.currPrice.addComma();
+					html += '                <div class="swiper-slide">';
+					html += '                    <div class="item_prod">';
+					html += '                        <div class="item_state">';
+					html += '                            <a onclick="cfnGoToGoodsDetail(\'' + item.goodsCd + '\')" class="itemLink">';
+					html += '                                <div class="itemPic">';
+					html += '                                    <img alt="BLUE-a" class=" vLHTC pd_img" src="'+ goodsView +'/'+item.sysImgNm +'">';
+					html += '                                </div>';
+					html += '                                <p class="itemBrand">'+item.brandGroupNm+'</p>';
+					html += '                                <div class="itemName">'+item.goodsNm+'</div>';
+					html += '                                <p class="itemPrice">'+item.currPrice.addComma();
 					if (item.currPrice != item.listPrice) {
 						html+='                                    <span class="itemPrice_original">'+item.listPrice.addComma()+'</span>';
 						html+='                                    <span class=" itemPercent">'+Math.floor(item.dcRate)+'%</span>';
 					}
-					
-					html+='                                </p>';
-					//html+='                                <div class="itemComment">#주문 폭주 상품</div>';
-					html+='                            </a>';
-					html+='                        </div>';
-					html+='                    </div>';
-					html+='                </div>                ';
+					html += '                                </p>';
+					if(item.goodsTnm != null){
+						html += '                        <div class="itemComment">'+item.goodsTnm+'</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>';
+			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_52" +array[0]).append(html);
 			
-			$("#G082_51" +array[0]).append(html);
 		}
-		
-		if($("#G082_51" +template[i].planContSq).length){
+		if($("#G082_52" +template[i].planContSq).length){
 			array.shift();
 		}
 	}
+}
+
+if(coupon != null || coupon != ''){
+	var html = '';
+	 
+	html += '<div class="cont_head">';
+	html += '	<div>';
+	html += '		<h4>'+coupon[0].title+'</h4>';
+	html += '	</div>';
+	html += '</div>';
+	html += '<div class="cont_body">';
+	html += '	<div class="coupon_list">';
+	html += '		<ul>';
+	$.each(coupon, function(idx, item) {
+		html += '			<li>';
+		html += '				<div class="coupon">';
+		html += '					<div>';
+		html += '						<p class="cp_name">'+item.cpnNm+'</p>';
+		html += '						<p class="cp_cont">';
+		if (item.dcWay == '할인율') {
+			html += '							<span> <span><em>'+item.dcPval+'%</em></span>';
+		}else{
+			html += '							<span><em>'+item.dcPval.addComma()+'</em>원</span>'; 
+		}
+		html += '						</p>';
+		html += '						<p class="cp_condition">'+item.buyLimitAmt.addComma()+'원 이상 구매 시 최대 ' +item.maxDcAmt.addComma()+'원 할인';
 
+		if (item.custPubLimitQty != 0) {
+			html += '								<span>1인 최대 '+item.custPubLimitQty+'장</span>';	
+		}
+		html += '						</p>';
+		html += '					</div>';
+		if(typeof item.couponStat != 'undefined'){
+			if (item.couponStat == '쿠폰받기') {
+				html += '					<button type="button" id="coupon_" class="btn btn_dark btn_block btn_coupon_down" onclick="fnPlanCouponDown('+item.cpnId+')">';  /* btn_coupon_done */
+				html += '						<span>쿠폰받기</span>';								/* 받기완료  */
+				html += '					</button>';			
+			}else{
+				html += '					<button type="button"';
+				html += '						class="btn btn_dark btn_block btn_coupon_done" disabled>';  
+				html += '						<span>받기완료</span>';								
+				html += '					</button>';			
+			}
+		}else{
+			html += '					<button type="button" id="coupon_" class="btn btn_dark btn_block btn_coupon_down" onclick="fnPlanCouponDown('+item.cpnId+')">';  /* btn_coupon_done */
+			html += '						<span>쿠폰받기</span>';								/* 받기완료  */
+			html += '					</button>';		
+		}
 		
+		html += '				</div>';
+		html += '				<button type="button" class="btn_underline"	id="btn_couponInfo_pop" onclick="useInfoCoupon('+item.cpnId+')">';
+		html += '					<span>사용안내</span>';
+		html += '				</button>';
+		html += '			</li>';
+	});
+	html += '		</ul>';
+	html += '	</div>';
+	html += '	<div class="announce_txt">';
+	html += '		<div class="note_txt">';
+	html += '			<img src="/images/pc/ico_content_find.png" alt="유의사항">';
+	html += '			<p>유의사항</p>';
+	html += '		</div>';
+	html += '		<div class="announce_list">';
+	html += '			<ul>';
+	html += '				<li>쿠폰 발급 기간 :'+ plan.dispStdt +'~'+ plan.dispEddt +'</li>';
+	html += '				<li>본 쿠폰은 해당 기획전 상품에만 적용 가능합니다.</li>';
+	html += '				<li>본 쿠폰은 해당 기획전 다운로드 버튼을 통해 발급받으실 수 있습니다.</li>';
+	html += '			</ul>';
+	html += '		</div>';
+	html += '	</div>';
+	html += '</div>';
+	html += '</div>';
+		
+	$("#G082_20").append(html);
 }
 
 //사용안내 모달
@@ -554,137 +571,150 @@ var useInfoCoupon = function (id) {
 		dataType 	: 'html',
 		success 	: function(result) {
 			if (result != null) {
-				$("#coupon_modal_02").html(result);
-				$("#coupon_modal_02").modal("show");
+				$("#couponInfoPop").html(result);
+				$("#couponInfoPop").modal("show");
 			}
 		}
 	});
 	
 	return false; 
 }
+//쿠폰 다운로드
+var fnPlanCouponDown = function(obj){
 
-// 쿠폰 다운로드
-	var fnPlanCouponDown = function(obj){
-	
-		if (!cfCheckLogin()) {
-			cfnGoToPage(_PAGE_LOGIN);
-			return false;
-		}
-		
-		let cpnId = obj;
-		gagajf.ajaxJsonSubmit(_PAGE_PLANNING_CPN_DOWNLOAD, JSON.stringify({cpnId: cpnId}), fnPlanCouponCallBack);
+	if (!cfCheckLogin()) {
+		cfnGoToPage(_PAGE_LOGIN);
+		return false;
 	}
 	
-	// 쿠폰다운로드 콜백
-	var fnPlanCouponCallBack = function(result){
-		
-		// 화면 전환 필요		
-	}
+	let cpnId = obj;
+	gagajf.ajaxJsonSubmit(_PAGE_PLANNING_CPN_DOWNLOAD, JSON.stringify({cpnId: cpnId}), fnPlanCouponCallBack);
+}
 
-</script>
-		<script type="text/javascript">
-	    // 컨텐츠 호출
-        $(document).ready( function() {
-        	
-        	//공유 버튼 토글 
-    		$("button[data-name=openShare]").on("click", function(){
-    			$(this).toggleClass("on").next(".shareWrap").toggleClass("on");
-    			return false;
-    		});
-    		//영역밖 클릭으로 공유토글 닫기
-    		$("body").on('click', function(e) { 
-    			if(!$(".shareWrap.on").parent().has(e.target).length) {
-    				$("button[data-name=openShare]").removeClass("on");
-    				$(".shareWrap").removeClass("on");
-    			};
-    		});
-    		
-    		$('.btn_copy').bind('click', function() {
-    			copyToClipboard();
-    		});
-    		
-        	
-            $(window).scroll(function(){
-                var navOffset = $('.item_header').offset().top - $('.bullet_sticky_nav').height();
-                var windScroll = $(window).scrollTop();
-                if (windScroll > navOffset){
-                    $(".bullet_sticky_nav").addClass("sticky");
-                }
-                else {
-                    $(".bullet_sticky_nav").removeClass("sticky");
-                }
-                $("#shiping_pop").click(function() {
-                    $("#Bulletship_modal").modal("show");
-                });	
-            });
-            
-            /* SLIDE - WIDE BANNER */
-			var br_bn_slide = new Swiper ('.coner_visual .swiper-container', {
-				loop: true,
-				slidesPerView: 1,
-				speed : 1500,
-				navigation: {
-					nextEl: '.coner_visual .swiper-button-next',
-					prevEl: '.coner_visual .swiper-button-prev',
-				},
-                pagination: {
-					el: '.coner_visual .swiper-pagination',
-					clickable: true,
-				},
-			});
+// 쿠폰다운로드 콜백
+var fnPlanCouponCallBack = function(result){
+	
+	// 화면 전환 필요		
+}
 
-            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_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(){
-                var hookHeader = $("header").outerHeight() + 100;
-                var hookHref = $(this).attr("href");
-                var hookPot = $(hookHref == "#" || hookHref == "" ? "body" : hookHref);
-                var hookPos = hookPot.offset().top - hookHeader;
-                $("html, body").animate({ scrollTop: hookPos }, 300);
 
-                $('.bullet_sticky_nav li a').removeClass('active');
-                $(this).addClass('active');
-            });
-        });
-    </script>
-	</th:block>
+$(document).ready( function() {
+
+	//공유 버튼 토글 
+	$("button[data-name=openShare]").on("click", function(){
+		$(this).toggleClass("on").next(".shareWrap").toggleClass("on");
+		return false;
+	});
+	//영역밖 클릭으로 공유토글 닫기
+	$("body").on('click', function(e) { 
+		if(!$(".shareWrap.on").parent().has(e.target).length) {
+			$("button[data-name=openShare]").removeClass("on");
+			$(".shareWrap").removeClass("on");
+		};
+	});
+	
+	$('.btn_copy').bind('click', function() {
+		copyToClipboard();
+	});
+
+	//팝업 - 쿠폰사용안내
+	$(document).on('click','#btn_couponInfo_pop',function(e){
+		$("#couponInfoPop .modal-content").load("popup_couponInfo.html");
+		$("#couponInfoPop").modal("show");
+		return false;
+	});      
+	$("#couponInfoPop_close").click(function() {
+		$.modal.close();
+	});					
+
+    //팝업 - 상품 베스트 리뷰 (detail)
+    $(document).on('click','#btn_pdBestReview_pop, .area_rv_best .best_review a',function(e){
+        $("#pdBestReviewPop .modal-content").load("pd_bestreviewdetail_pop.html");
+        $("#pdBestReviewPop").modal("show");
+        return false;
+    });      
+    $("#pdBestReviewPop_close").click(function() {
+        $.modal.close();
+    });            
+
+    /* SLIDE - 상단 프로모션 배너 */
+	var promotion_visual_slide = new Swiper ('.dp_detail_visual .promotion_visual.type2 .swiper-container', {
+		loop: true,
+		slidesPerView: 1,
+		speed : 1500,
+		navigation: {
+			nextEl: '.promotion_visual.type2 .swiper-button-next',
+			prevEl: '.promotion_visual.type2 .swiper-button-prev',
+		},
+        pagination: {
+			el: '.promotion_visual.type2 .swiper-pagination',
+			clickable: true,
+		},
+	}); 
+
+    /* SLIDE - 중간 배너 */
+	var mid_banner_slide = new Swiper ('.dp_mid_banner .mid_banner .swiper-container', {
+		loop: true,
+		slidesPerView: 1,
+		speed : 1500,
+		navigation: {
+			nextEl: '.mid_banner .swiper-button-next',
+			prevEl: '.mid_banner .swiper-button-prev',
+		},
+        pagination: {
+			el: '.mid_banner .swiper-pagination',
+			clickable: true,
+		},
+	});
+
+    /* SLIDE - 대표상품 슬라이드 2열 상품 */
+    var dp_listItems_slide1 = new Swiper ('.dp_listItems_cont.type2 .swiper-container', {
+        loop: false,
+        slidesPerView: 2,
+        slidesPerGroup: 2,
+        spaceBetween: 20,
+        speed : 800,
+        navigation: {
+            nextEl: '.dp_listItems_cont.type2 .swiper-button-next',
+            prevEl: '.dp_listItems_cont.type2 .swiper-button-prev',
+        },
+        pagination: {
+            el: '.dp_listItems_cont.type2 .swiper-pagination',
+            clickable: true,
+        },
+    });
+
+    /* SLIDE - 대표상품 슬라이드 4열 상품 */
+    var dp_listItems_slide2 = new Swiper ('.dp_listItems_cont.type3 .swiper-container', {
+        loop: false,
+        slidesPerView: 4,
+        slidesPerGroup: 4,
+        spaceBetween: 20,
+        speed : 800,
+        navigation: {
+            nextEl: '.dp_listItems_cont.type3 .swiper-button-next',
+            prevEl: '.dp_listItems_cont.type3 .swiper-button-prev',
+        },
+        pagination: {
+            el: '.dp_listItems_cont.type3 .swiper-pagination',
+            clickable: true,
+        },
+    });
+
+    /* SLIDE - 다른 기획전 보기 */
+    var other_dp_slide_slide = new Swiper ('.other_dp_slide .swiper-container', {
+		slidesPerView: 5,
+        spaceBetween: 20,
+		navigation: {
+			nextEl: '.other_dp_slide .swiper-button-next',
+			prevEl: '.other_dp_slide .swiper-button-prev',
+		},
+	});            
+
+});
+</script>
+</th:block>
 
 </body>
 </html>