瀏覽代碼

Merge branch 'develop' into bin2107

# Conflicts:
#	src/main/java/com/style24/front/biz/dao/TsfDisplayDao.java
#	src/main/java/com/style24/persistence/mybatis/shop/TsfDisplay.xml
bin2107 5 年之前
父節點
當前提交
291f7c7fb9

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

@@ -4,7 +4,17 @@ import java.util.Collection;
 import java.util.List;
 
 import com.style24.core.support.annotation.ShopDs;
-import com.style24.persistence.domain.*;
+import com.style24.persistence.domain.BrandGroup;
+import com.style24.persistence.domain.Cate1;
+import com.style24.persistence.domain.Cate2;
+import com.style24.persistence.domain.Cate3;
+import com.style24.persistence.domain.Cate4;
+import com.style24.persistence.domain.Cate4Srch;
+import com.style24.persistence.domain.Cate5;
+import com.style24.persistence.domain.Contents;
+import com.style24.persistence.domain.GnbTab;
+import com.style24.persistence.domain.MainLayout;
+import com.style24.persistence.domain.Popup;
 
 /**
  * 전시 Dao
@@ -113,6 +123,17 @@ public interface TsfDisplayDao {
 	 * @date 2021. 3. 16
 	 */
 	Cate4Srch getCate4srch(Cate4Srch cate4Srch);
+	
+	/**
+	 * 팝업 목록
+	 *
+	 * @param keyword - 키워드정보
+	 * @return
+	 * @author eskim
+	 * @date 2021. 3. 30
+	 */
+	Collection<Popup> getPopupList(Popup popup);
+
 
 	/**
 	 * 몰메인 브랜드픽 조회

+ 26 - 4
src/main/java/com/style24/front/biz/service/TsfDisplayService.java

@@ -2,9 +2,6 @@ package com.style24.front.biz.service;
 
 import java.util.Collection;
 
-import com.style24.front.biz.dao.TsfGoodsDao;
-import com.style24.front.support.security.session.TsfSession;
-import com.style24.persistence.domain.*;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.cache.annotation.Cacheable;
 import org.springframework.stereotype.Service;
@@ -12,10 +9,21 @@ import org.springframework.stereotype.Service;
 import com.style24.core.biz.service.TscEnvsetService;
 import com.style24.core.support.env.TscConstants;
 import com.style24.front.biz.dao.TsfDisplayDao;
+import com.style24.front.biz.dao.TsfGoodsDao;
 import com.style24.front.support.env.TsfConstants;
+import com.style24.front.support.security.session.TsfSession;
+import com.style24.persistence.domain.BrandGroup;
+import com.style24.persistence.domain.Cate1;
+import com.style24.persistence.domain.Cate2;
+import com.style24.persistence.domain.Cate3;
+import com.style24.persistence.domain.Cate4;
+import com.style24.persistence.domain.Cate4Srch;
+import com.style24.persistence.domain.Contents;
+import com.style24.persistence.domain.GnbTab;
+import com.style24.persistence.domain.MainLayout;
+import com.style24.persistence.domain.Popup;
 
 import lombok.extern.slf4j.Slf4j;
-import sun.applet.Main;
 
 /**
  * 전시 Service
@@ -274,6 +282,19 @@ public class TsfDisplayService {
 	public Cate4Srch getCate4srch(Cate4Srch cate4Srch){
 		return displayDao.getCate4srch(cate4Srch);
 	}
+	
+	/**
+	 * 팝업 목록
+	 *
+	 * @param popup
+	 * @return
+	 * @author eskim
+	 * @date 2021. 3. 30
+	 */
+	public Collection<Popup> getPopupList(Popup popup) {
+		popup.setSiteCd(TscConstants.Site.STYLE24.value());
+		return displayDao.getPopupList(popup);
+	} 
 
 	/**
 	 * 몰메인 MD PICK 목록
@@ -299,5 +320,6 @@ public class TsfDisplayService {
 		log.info("getContentsForGoods contentsList.size()::{}",contentsList.size());
 
 		return contentsList;
+
 	}
 }

+ 45 - 13
src/main/java/com/style24/front/biz/web/TsfDisplayController.java

@@ -7,18 +7,6 @@ import java.util.HashMap;
 
 import javax.servlet.http.HttpServletResponse;
 
-import com.gagaframework.web.parameter.GagaMap;
-import com.style24.core.support.env.TscConstants;
-import com.style24.front.support.security.session.TsfSession;
-import com.style24.persistence.domain.BrandGroup;
-import com.style24.persistence.domain.Cate4Srch;
-import com.style24.persistence.domain.Contents;
-import com.style24.persistence.domain.GnbTab;
-import com.style24.persistence.domain.Goods;
-import com.style24.persistence.domain.Lookbook;
-import com.style24.persistence.domain.MainLayout;
-import com.style24.persistence.domain.Plan;
-import com.style24.persistence.domain.Social;
 import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.mobile.device.Device;
@@ -29,14 +17,25 @@ import org.springframework.web.bind.annotation.RequestParam;
 import org.springframework.web.bind.annotation.ResponseBody;
 import org.springframework.web.servlet.ModelAndView;
 
-import com.style24.front.biz.service.TsfSocialService;
 import com.style24.core.biz.service.TscEnvsetService;
 import com.style24.core.biz.service.TscLookbookService;
 import com.style24.core.support.message.TscMessageByLocale;
 import com.style24.front.biz.service.TsfDisplayService;
 import com.style24.front.biz.service.TsfGoodsService;
 import com.style24.front.biz.service.TsfPlanningService;
+import com.style24.front.biz.service.TsfSocialService;
 import com.style24.front.support.controller.TsfBaseController;
+import com.style24.front.support.security.session.TsfSession;
+import com.style24.persistence.domain.BrandGroup;
+import com.style24.persistence.domain.Cate4Srch;
+import com.style24.persistence.domain.Contents;
+import com.style24.persistence.domain.GnbTab;
+import com.style24.persistence.domain.Goods;
+import com.style24.persistence.domain.Lookbook;
+import com.style24.persistence.domain.MainLayout;
+import com.style24.persistence.domain.Plan;
+import com.style24.persistence.domain.Popup;
+import com.style24.persistence.domain.Social;
 
 import lombok.extern.slf4j.Slf4j;
 
@@ -289,6 +288,12 @@ public class TsfDisplayController extends TsfBaseController {
 			}
 			brandMainLayoutList.add(brandMain);
 		}
+		
+		mav.addObject("preview", paramMap.get("preview") );
+		mav.addObject("viewDt", paramMap.get("viewDt"));
+		mav.addObject("viewPage", "G037_31");
+		mav.addObject("popupCateNo", paramMap.get("brandGroupNo"));
+		
 		//log.info("brandMainLayoutList::{}", brandMainLayoutList);
 		mav.addObject("brandMainLayoutList", brandMainLayoutList);
 		mav.setViewName(super.getDeviceViewName("display/BrandMainForm"));
@@ -337,6 +342,11 @@ public class TsfDisplayController extends TsfBaseController {
 		cate.setMaxRow(20);
 		mav.addObject("bestGoodsList", goodsService.getContentsCategoryGoodsList(cate));
 
+		mav.addObject("preview", cate.getPreview() );
+		mav.addObject("viewDt", cate.getViewDt());
+		mav.addObject("viewPage", "G037_30");
+		mav.addObject("popupCateNo", cate.getCate1No());
+		
 		mav.addObject("params", cate);
 
 		return mav;
@@ -370,4 +380,26 @@ public class TsfDisplayController extends TsfBaseController {
 		return coreLookbookService.getLookbookList(lookbook);
 	}
 
+	/**
+	 * 팝업 목록
+	 *
+	 * @return
+	 * @throws Exception
+	 * @author eskim
+	 * @since 2021. 3. 30
+	 */
+	@GetMapping("/popup/list")
+	@ResponseBody
+	public Collection<Popup> getPopupList(@RequestParam HashMap<String, String> paramMap) {
+		Popup popup = new Popup();
+		popup.setFrontGb(TsfSession.getFrontGb());
+		popup.setViewPage(paramMap.get("viewPage"));
+		if (paramMap.get("cateNo") != null && paramMap.get("cateNo") != "") {
+			popup.setCateNo(Integer.parseInt(paramMap.get("cateNo")));
+		}
+		popup.setPlanSq(paramMap.get("planSq"));
+		popup.setPreview(paramMap.get("preview"));
+		popup.setViewDt(paramMap.get("viewDt"));
+		return displayService.getPopupList(popup);
+	}
 }

+ 11 - 13
src/main/java/com/style24/front/biz/web/TsfPlanningController.java

@@ -124,19 +124,17 @@ public class TsfPlanningController extends TsfBaseController {
 	 * @since 2021. 3. 9
 	 */
 	@GetMapping("/detail/form")
-	@ResponseBody
-	public ModelAndView PlanningDetailForm(@RequestParam(value = "planSq") int planSq) {
+	public ModelAndView PlanningDetailForm(Plan plan) {
 		ModelAndView mav = new ModelAndView();
-
+		
 		// 접근 불가능한 기획전 메시지 조회
-		String inaccessibleMsg = planningService.getInaccessiblePlanningMessage(planSq);
+		String inaccessibleMsg = planningService.getInaccessiblePlanningMessage(plan.getPlanSq());
 		if (StringUtils.isNotBlank(inaccessibleMsg)) {
 			mav.addObject("inaccessibleMsg", inaccessibleMsg);
 			mav.setViewName(super.getDeviceViewName("error/Inaccess"));
 			return mav;
 		}
 
-		Plan plan = new Plan();
 		Review review = new Review();
 		Coupon coupon = new Coupon();
 
@@ -146,10 +144,10 @@ public class TsfPlanningController extends TsfBaseController {
 		plan.setCustNo(TsfSession.isLogin() ? TsfSession.getInfo().getCustNo() : 0);
 
 		// 기본 set
-		plan.setExceptPlanSq(planSq);
-		plan.setPlanSq(planSq);
-		review.setPlanSq(planSq);
-		coupon.setPlanSq(planSq);
+		plan.setExceptPlanSq(plan.getPlanSq());
+		plan.setPlanSq(plan.getPlanSq());
+		review.setPlanSq(plan.getPlanSq());
+		coupon.setPlanSq(plan.getPlanSq());
 
 		//plan.setSiteCd(TscConstants.Site.STYLE24.value());
 		plan.setFrontGb(TsfSession.getFrontGb());
@@ -209,10 +207,10 @@ public class TsfPlanningController extends TsfBaseController {
 //		}
 
 		// Popup Parameter
-//		mav.addObject("preview", plan.getPreview());
-//		mav.addObject("viewDt", plan.getViewDt());
-//		mav.addObject("viewPage", "40");
-//		mav.addObject("popupPlanSq", plan.getPlanSq());
+		mav.addObject("preview", plan.getPreview());
+		mav.addObject("viewDt", plan.getViewDt());
+		mav.addObject("viewPage", "G037_40");
+		mav.addObject("popupPlanSq", plan.getPlanSq());
 
 		mav.setViewName(super.getDeviceViewName("planning/PlanningDetailForm"));
 		return mav;

+ 4 - 0
src/main/java/com/style24/persistence/domain/Cate4Srch.java

@@ -44,5 +44,9 @@ public class Cate4Srch extends TscBaseDomain {
 	private String custGb;				// 고객구분
 	private int maxRow;					// 최대ROW수
 	private String[] exceptGoodsArr;	// 제외상품배열
+	
+	private String dispDt;			// 기획전 기간
+	private String viewDt;			// 미리보기 일시
+	private String preview;			// 미리보기 여부 (Y:미리보기)
 
 }

+ 2 - 1
src/main/java/com/style24/persistence/domain/Goods.java

@@ -71,7 +71,8 @@ public class Goods extends TscBaseDomain {
 	private String newCustOrdYn;		//신규고객 구매가능여부(Y:신규고객만 구매가능)
 	private int costPrice;		//원가
 	private String adultYn;		//성인용품여부
-
+	private String sellStdt;		//판매시작일
+	private String sellEddt;		//판매종료일
 	private String colorCd;		//색상코드
 	private String colorNm;		//색상코드명
 	private String brandNm;		//브랜드명

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

@@ -89,6 +89,9 @@ public class Plan extends TscBaseDomain {
 	private String planDtlStat;		//기획전상세상태(공통코드G044)
 	private String copyBrandCd;		//복사할 브랜드코드
 	private String adminPreview;	// 어드민미리보기 여부 (Y:미리보기)
+	private String dispDt;			// 기획전 기간
+	private String viewDt;			// 미리보기 일시
+	private String preview;			// 미리보기 여부 (Y:미리보기)
 
 	// 기획전 브랜드
 	private Integer brandGroupNo;	//기획전브랜드그룹번호

+ 43 - 0
src/main/java/com/style24/persistence/domain/Popup.java

@@ -0,0 +1,43 @@
+package com.style24.persistence.domain;
+
+import com.style24.persistence.TscBaseDomain;
+
+import lombok.Data;
+
+/**
+ * 팝업 Domain
+ *
+ * @author eskim
+ * @since 2021.03.30
+ */
+@SuppressWarnings("serial")
+@Data
+public class Popup extends TscBaseDomain {
+
+	private String popupSq;
+	private String siteCd;
+	private String frontGb;
+	private String popupGb;
+	private String imgUrl1;
+	private String linkUrl1;
+	private String imgUrl2;
+	private String linkUrl2;
+	private String imgUrl3;
+	private String linkUrl3;
+	private String imgUrl4;
+	private String linkUrl4;
+	private String imgUrl15;
+	private String linkUrl15;
+	private String viewPage;
+	private Integer cateNo;
+	private String planSq;
+	private Integer dispOrd;
+	private String preview = "N";
+	private String viewDt;
+	private Integer topLoc;
+	private Integer leftLoc;
+	private String popupWidth;
+	private String popupHeight;
+	private Integer unexpDays;
+
+}

+ 55 - 1
src/main/java/com/style24/persistence/mybatis/shop/TsfDisplay.xml

@@ -490,6 +490,60 @@
 			AND CONTENTS_LOC = #{contentsLoc}
 		</if>
 	</select>
+	
+	<!-- 팝업 목록 -->
+	<select id="getPopupList" parameterType="PopUp" resultType="PopUp">
+		/* TsfDisplay.getPopupList */
+		SELECT *
+		FROM (
+		    SELECT POPUP_SQ
+		         , POPUP_GB
+		         , IMG_URL1
+		         , LINK_URL1
+		         , UNEXP_DAYS
+		         , ROW_NUMBER() OVER( ORDER BY DISP_ORD, REG_DT DESC) AS RNUM
+		    <choose>
+		         <when test='preview != null and preview == "Y"'>
+		         FROM   TB_POPUP_PREVIEW
+		         </when>
+		         <otherwise>
+		         FROM   TB_POPUP
+		         </otherwise>
+		    </choose>
+		    WHERE  1 = 1
+		    AND ( FRONT_GB = 'A'
+		    <if test='frontGb != null and frontGb !=""'>
+		          OR FRONT_GB = #{frontGb}
+		    </if>
+		         )
+		    AND ( VIEW_PAGE = 'G037_10'
+		    <if test='viewPage != null and viewPage !=""'>
+		          OR ( VIEW_PAGE = #{viewPage}
+		               <if test='cateNo != null and cateNo > 0'>
+		               AND CATE_NO = #{tcateCd}
+		               </if>
+		               <if test='planSq != null and planSq !=""'>
+		               AND PLAN_SQ = #{planSq}
+		               </if>
+		             )
+		    </if>
+		         )
+		    AND USE_YN = 'Y'
+		    AND SITE_CD = #{siteCd}
+		    <choose>
+		    <when test='preview != null and preview == "Y"'>
+		    AND  DISP_STDT <![CDATA[<=]]> STR_TO_DATE(#{viewDt},'%Y%m%d%H%i%S')
+		    AND DISP_EDDT >= STR_TO_DATE(#{viewDt},'%Y%m%d%H%i%S')
+		    </when>
+		    <otherwise>
+		    AND DISP_STDT <![CDATA[ <= ]]> NOW()
+		    AND DISP_EDDT >= NOW()
+		    </otherwise>
+		    </choose>
+		    ORDER BY DISP_ORD, REG_DT DESC
+		) Z 
+	</select>
+	
 
 	<!-- 몰메인 브랜드픽 조회 -->
 	<select id="getContentsBannerList" parameterType="Contents" resultType="Contents">
@@ -533,4 +587,4 @@
 				 ) B
 				 )
 	</select>
-</mapper>
+</mapper>

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

@@ -190,7 +190,7 @@
 		                              AND IFNULL(#{custNo}, 0) = W.CUST_NO
 		LEFT OUTER JOIN TB_GOODS_QUICK_DELEVERY_SKIP DS ON G.GOODS_CD =DS.GOODS_CD
 		WHERE G.GOODS_CD = #{goodsCd}
-		-- AND G.SELF_MALL_YN = 'Y' --자사몰 노출(기획전과 상품상세는 노출)
+		AND NOW() BETWEEN SELL_STDT AND SELL_EDDT	/*판매기간 확인*/
 		<if test='adminYn == null or adminYn != "Y"'>
 		AND G.GOODS_STAT = 'G008_90'
 		</if>
@@ -230,6 +230,7 @@
 		                                 AND B.GOODS_CD = #{goodsCd}
 		                                 AND B.DEL_YN = 'N'
 		    INNER JOIN TB_GOODS C ON B.GOODS_CD = C.GOODS_CD
+		                          AND NOW() BETWEEN C.SELL_STDT AND C.SELL_EDDT           /*판매기간 확인*/
 		    WHERE A.USE_YN = 'Y'
 		    AND A.SITE_CD = #{siteCd}
 		    AND NOW() BETWEEN A.SOCIAL_STDT AND A.SOCIAL_EDDT
@@ -265,6 +266,7 @@
 		                          AND O.OPT_CD = VS.OPT_CD
 		      WHERE G.GOODS_CD =  #{goodsCd}
 		      AND G.GOODS_TYPE = 'G056_N' -- 일반상품
+		      AND NOW() BETWEEN G.SELL_STDT AND G.SELL_EDDT           /*판매기간 확인*/
 		      GROUP BY G.GOODS_CD , G.SELF_GOODS_YN , G.MIN_ORD_QTY, G.MAX_ORD_QTY, O.OPT_CD1
 		) A
 	</select>
@@ -301,6 +303,8 @@
 		      INNER JOIN VW_STOCK VS ON O.GOODS_CD = VS.GOODS_CD
 		                          AND O.OPT_CD = VS.OPT_CD
 		      WHERE G.GOODS_CD = #{goodsCd}
+		      AND G.GOODS_TYPE = 'G056_N' -- 일반상품
+		      AND NOW() BETWEEN G.SELL_STDT AND G.SELL_EDDT           /*판매기간 확인*/
 		     ) B
 		ORDER BY DISP_ORD
 	</select>
@@ -335,6 +339,8 @@
 		      INNER JOIN VW_STOCK VS ON O.GOODS_CD = VS.GOODS_CD
 		                          AND O.OPT_CD = VS.OPT_CD
 		      WHERE G.GOODS_CD = #{goodsCd}
+		      AND G.GOODS_TYPE = 'G056_N' -- 일반상품
+		      AND NOW() BETWEEN G.SELL_STDT AND G.SELL_EDDT           /*판매기간 확인*/
 		     ) B
 		ORDER BY DISP_ORD
 	</select>
@@ -408,6 +414,8 @@
 		     , G.LIST_PRICE
 		     , G.GOODS_STAT
 		     , G.SELF_GOODS_YN
+		     , DATE_FORMAT(G.SELL_STDT ,'%Y%m%d%H%i%S') AS SELL_STDT
+		     , DATE_FORMAT(G.SELL_EDDT ,'%Y%m%d%H%i%S') AS SELL_EDDT
 		     , FN_GET_BENEFIT_PRICE(#{frontGb},G.GOODS_CD, G.CURR_PRICE,#{custGb}) AS CURR_PRICE
 		     , (CASE WHEN D.DISP_NM_LANG = 'EN' THEN D.BRAND_GROUP_ENM ELSE D.BRAND_GROUP_KNM END) AS BRAND_GROUP_NM
 		     , (SELECT MAX(SYS_IMG_NM) FROM TB_GOODS_IMG WHERE GOODS_CD = G.GOODS_CD AND COLOR_CD = G.MAIN_COLOR_CD AND DEFAULT_IMG_YN = 'Y') AS SYS_IMG_NM
@@ -419,7 +427,7 @@
 		        GROUP BY GOODS_CD 
 		        ) AS STOCK_QTY
 		FROM TB_GOODS_COMPOSE C
-		INNER JOIN TB_GOODS G ON C.COMPS_GOODS_CD = G.GOODS_CD  
+		INNER JOIN TB_GOODS G ON C.COMPS_GOODS_CD = G.GOODS_CD
 		INNER JOIN TB_BRAND B ON G.BRAND_CD = B.BRAND_CD
 		                      AND B.USE_YN = 'Y'
 		INNER JOIN TB_SITE_BRAND SB ON B.BRAND_CD = SB.BRAND_CD
@@ -651,6 +659,7 @@
 		      INNER JOIN TB_GOODS G ON B.GOODS_CD = G.GOODS_CD
 		                            AND G.GOODS_STAT = 'G008_90'
 		                            AND G.SELF_MALL_YN = 'Y'
+		                            AND NOW() BETWEEN G.SELL_STDT AND G.SELL_EDDT
 		                            <if test='adminYn == null or adminYn != "Y"'>
 		                            AND G.GOODS_STAT = 'G008_90'
 		                            </if>
@@ -822,6 +831,8 @@
 		     , G.GOODS_STAT
 		     , G.MAIN_COLOR_CD AS COLOR_CD
 		     , G.ITEMKIND_CD
+		     , DATE_FORMAT(G.SELL_STDT ,'%Y%m%d%H%i%S') AS SELL_STDT
+		     , DATE_FORMAT(G.SELL_EDDT ,'%Y%m%d%H%i%S') AS SELL_EDDT
 		     , (SELECT TI.SIZE_GB FROM TB_ITEMKIND TI WHERE TI.ITEMKIND_CD = G.ITEMKIND_CD) AS SIZE_GB
 		FROM TB_GOODS_COMPOSE A
 		INNER JOIN TB_GOODS G ON A.COMPS_GOODS_CD = G.GOODS_CD
@@ -960,6 +971,8 @@
 					</choose>
 		            AND    G.GOODS_STAT = 'G008_90' /*승인완료상품*/
 		            AND    G.FORMAL_GB = 'G009_10' /*정상상품*/
+		            AND    G.SELF_MALL_YN = 'Y'   /*몰노출상품*/
+		            AND    NOW() BETWEEN G.SELL_STDT AND G.SELL_EDDT   /*판매기간*/
 		            AND    S.STOCK_QTY <![CDATA[>]]> 0 /*재고있는상품*/
 		            AND    B.USE_YN = 'Y'
 		            AND    BG.USE_YN = 'Y'
@@ -1104,6 +1117,7 @@
 		            AND    G.GOODS_STAT = 'G008_90' /*승인완료상품*/
 		            AND    G.FORMAL_GB = 'G009_10' /*정상상품*/
 		            AND    G.SELF_MALL_YN = 'Y'   /*몰노출상품*/
+		            AND    NOW() BETWEEN G.SELL_STDT AND G.SELL_EDDT   /*판매기간*/
 		            AND    GS.STOCK_QTY <![CDATA[>]]> 0 /*재고있는상품*/
 		            AND    B.USE_YN = 'Y'
 		            AND    BG.USE_YN = 'Y'

+ 113 - 0
src/main/webapp/WEB-INF/views/web/common/fragments/FooterWeb.html

@@ -960,6 +960,108 @@
 // 	});
 	}
 	
+	// 팝업
+	let fnGetPopup = function(){
+		let data = {viewPage : [[${viewPage}]]
+					,cateNo : [[${popupCateNo}]]
+					,planSq : [[${popupPlanSq}]]
+					,preview : [[${preview}]]
+					,viewDt : [[${viewDt}]]
+		};
+		$.getJSON('/display/popup/list', data, function(result, status) {
+			if (status === 'success') {
+				if(result.length>0){
+					let popupYn = "N";
+					let popupSq = "";
+					let tag = '';
+					tag += '<div id="layer_popup" class="popup_main_notice">\n';
+					tag += '	<div class="popup_content">\n';
+					tag += '		<div class="popup_body">\n';
+					tag += '			<div class="swiper-container">\n';
+					tag += '				<div class="swiper-wrapper">\n';
+					$.each(result, function(idx, item) {
+						if(document.cookie.match('(^|;)?style_popup_'+item.popupSq+'=([^;]*)(;|$)')==null) {
+							tag += '					<div class="swiper-slide">\n';
+							if(!gagajf.isNull(item.linkUrl1) && item.linkUrl1 !== "#"){
+							tag += '						<a href="'+ item.linkUrl1 +'"  target="_blank">\n';	
+							}
+							tag += '						<img src="/images/pc/thumb/img_main_pop1.jpg" width="100%" alt="">\n';
+							if(!gagajf.isNull(item.linkUrl1) && item.linkUrl1 !== "#"){
+							tag += '						</a>\n';
+							}
+							tag += '					</div>\n';
+							popupYn = "Y";
+							popupSq += item.popupSq +"|";
+						}
+					});	
+					tag += '				</div>\n';
+					tag += '				<div class="swiper-button-prev"></div>\n';
+					tag += '				<div class="swiper-button-next"></div>\n';
+					tag += '			</div>\n';
+					tag += '		</div>\n';
+					tag += '		<div class="popup_footer">\n';
+					tag += '			<a href="javascript:void(0);" onclick="fnLayerPopupUnexpDaysClose(\''+popupSq+'\',1);" class="btn_underline"> 하루 보지 않기</a>\n';
+					tag += '			<a href="javascript:void(0);" id="btnPopupClose" onclick="fnLayerPopupClose();" class="btn_popup_close">닫기</a>\n';
+					tag += '		</div>\n';
+					tag += '	</div>\n';
+					tag += '</div>\n';
+					
+					if (popupYn == "Y"){
+						if ($('#layer_popup').length === 0) {
+							$('body').append(tag);
+						}	
+					}
+					
+					/* SLIDE - 메인 공지 팝업 */
+					var popup_main_notice_slide = new Swiper ('.popup_main_notice .swiper-container', {
+						loop: false,
+						slidesPerView:'auto',
+						spaceBetween: 0,
+						speed:200,
+						autoplay: false,
+						navigation: {
+							nextEl: '.popup_main_notice .swiper-button-next',
+							prevEl: '.popup_main_notice .swiper-button-prev',
+						},
+					});	
+
+					/* 메인 공지 팝업 갯수체크 */
+					var popNoticeCont = $('.popup_main_notice .swiper-slide');
+					var popNoticeLength = popNoticeCont.length;
+					if (popNoticeLength == 1) {
+						popNoticeCont.parents('.popup_body').addClass('onlyNotice');
+					} else {
+						popNoticeCont.parents('.popup_body').removeClass('onlyNotice');
+					}
+					
+				}
+			}
+		});
+	}
+
+	let fnLayerPopupUnexpDaysClose = function(seq, unexpDays){
+		let arrSeq = seq.split("|");
+		if (arrSeq.length > 0){
+			let todayDate = new Date();
+			//todayDate = new Date(parseInt(todayDate.getTime() / 86400000) * 86400000 + 54000000);
+			todayDate = new Date(parseInt(todayDate.getTime() / 86400000) * 86400000);	// 당일 자정처리
+			todayDate.setDate(todayDate.getDate() + unexpDays);
+			
+			$.each(arrSeq, function (idx, item) {
+				if (!gagajf.isNull(item)){
+					document.cookie = "style_popup_"+item+"=Y; path=/; expires=" + todayDate.toGMTString() + ";";	
+				}
+			});
+		}
+		
+		fnLayerPopupClose();
+	}
+	// 창 닫기
+	let fnLayerPopupClose = function(){
+		//$('#layer_popup').hide();
+		$('#layer_popup').remove();
+	}
+	
 	$(document).ready( function() {
 		// 퀵메뉴탭 조회
 		fnCreateQuickMenuTab();
@@ -970,6 +1072,9 @@
 		// 최근본상품 조회
 		fnGetRecentlyGoods();
 		
+		// 팝업조회
+		fnGetPopup();
+		
 		// Family Site
 		$('.family_link').on('click','.btn',function(e){
 			e.preventDefault();
@@ -1034,6 +1139,14 @@
 		$(".coupon_pop_btn").click(function() {
 			$(".coupon_popup").modal("show");
 		});
+		
+						
+
+		/* 메인 공지 팝업 닫기 */
+		$(document).on('click','#btnPopupClose',function(e){
+			$('#popupMainNotice').hide();
+			return false;
+		});		
 	});
 /*]]>*/
 </script>