gagamel 5 лет назад
Родитель
Сommit
98f6e573cd

+ 9 - 0
src/main/java/com/style24/front/biz/dao/TsfDisplayDao.java

@@ -32,6 +32,15 @@ public interface TsfDisplayDao {
 	 */
 	Collection<BrandGroup> getGnbBrandGroupList(Contents contents);
 
+	/**
+	 * 브랜드메인의 GNB브랜드그룹 정보
+	 * @param brandGroupNo - 브랜드그룹번호
+	 * @return
+	 * @author gagamel
+	 * @since 2021. 3. 11
+	 */
+	BrandGroup getGnbBrandGroup(Integer brandGroupNo);
+
 	/**
 	 * GNB탭 목록
 	 * @param gnbTab - GNB탭 정보

+ 11 - 0
src/main/java/com/style24/front/biz/service/TsfDisplayService.java

@@ -49,6 +49,17 @@ public class TsfDisplayService {
 		return displayDao.getGnbBrandGroupList(contents);
 	}
 
+	/**
+	 * 브랜드메인의 GNB브랜드그룹 정보 조회
+	 * @param brandGroupNo - 브랜드그룹번호
+	 * @return
+	 * @author gagamel
+	 * @since 2021. 3. 16
+	 */
+	public BrandGroup getGnbBrandGroup(Integer brandGroupNo) {
+		return displayDao.getGnbBrandGroup(brandGroupNo);
+	}
+
 	/**
 	 * GNB 탭 목록
 	 * @param gnbTab - GNB탭 정보

+ 50 - 3
src/main/java/com/style24/front/biz/web/TsfDisplayController.java

@@ -1,8 +1,12 @@
 package com.style24.front.biz.web;
 
+import java.io.IOException;
 import java.util.Collection;
 import java.util.HashMap;
 
+import javax.servlet.http.HttpServletResponse;
+
+import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.mobile.device.Device;
 import org.springframework.stereotype.Controller;
@@ -48,7 +52,7 @@ public class TsfDisplayController extends TsfBaseController {
 	 * 몰 메인
 	 * @return
 	 * @author gagamel
-	 * @since 2020. 2. 3
+	 * @since 2021. 2. 3
 	 */
 	@GetMapping("/mall/main/form")
 	public ModelAndView mallMain(Device device, @RequestParam HashMap<String, String> paramMap) {
@@ -65,7 +69,7 @@ public class TsfDisplayController extends TsfBaseController {
 	 * @return
 	 * @throws Exception
 	 * @author gagamel
-	 * @since 2020. 3. 11
+	 * @since 2021. 3. 11
 	 */
 	@GetMapping("/gnb/brand/group/list")
 	@ResponseBody
@@ -92,7 +96,7 @@ public class TsfDisplayController extends TsfBaseController {
 	 * @return
 	 * @throws Exception
 	 * @author gagamel
-	 * @since 2020. 3. 11
+	 * @since 2021. 3. 11
 	 */
 	@GetMapping("/gnb/tab/list")
 	@ResponseBody
@@ -101,4 +105,47 @@ public class TsfDisplayController extends TsfBaseController {
 		return displayService.getGnbTabList(gnbTab);
 	}
 
+	/**
+	 * 브랜드 메인
+	 * @param device - 디바이스 정보
+	 * @param paramMap - 파라미터 정보
+	 * @param response - HttpServletResponse
+	 * @return
+	 * @throws IOException
+	 * @author gagamel
+	 * @since 2021. 3. 16
+	 */
+	@GetMapping("/brand/main/form")
+	public ModelAndView brandMain(Device device, @RequestParam HashMap<String, String> paramMap, HttpServletResponse response) throws IOException {
+		log.info("{}", paramMap);
+
+		ModelAndView mav = new ModelAndView();
+
+		if (StringUtils.isBlank(paramMap.get("brandGroupNo"))) {
+			response.sendRedirect("/");
+		}
+
+		// 브랜드그룹 정보
+		mav.addObject("brandGroupInfo", displayService.getGnbBrandGroup(Integer.parseInt(paramMap.get("brandGroupNo"))));
+
+		mav.setViewName(super.getDeviceViewName("display/BrandMainForm"));
+
+		return mav;
+	}
+
+	/**
+	 * 브랜드 GNB 탭 목록
+	 * @param gnbTab - GNB탭 정보
+	 * @return
+	 * @throws Exception
+	 * @author gagamel
+	 * @since 2021. 3. 16
+	 */
+	@GetMapping("/brand/gnb/tab/list")
+	@ResponseBody
+	public Collection<GnbTab> getBrandGnbTabList(GnbTab gnbTab) {
+		gnbTab.setGtabGb("B"); // 브랜드GNB
+		return displayService.getGnbTabList(gnbTab);
+	}
+
 }

+ 17 - 0
src/main/java/com/style24/persistence/mybatis/shop/TsfDisplay.xml

@@ -50,6 +50,20 @@
 		</choose>
 	</select>
 	
+	<!-- GNB 브랜드그룹 조회 -->
+	<select id="getGnbBrandGroup" parameterType="Integer" resultType="BrandGroup">
+		/* TsfDisplay.getGnbBrandGroup */
+		SELECT BRAND_GROUP_NO
+		     , CASE WHEN DISP_NM_LANG = 'EN' THEN BRAND_GROUP_ENM
+		            ELSE BRAND_GROUP_KNM
+		       END              AS BRAND_GROUP_NM
+		     , LOGO_FILE_NM
+		     , RGB_CD
+		FROM   TB_BRAND_GROUP
+		WHERE  BRAND_GROUP_NO = #{brandGroupNo}
+		AND    USE_YN = 'Y'
+	</select>
+	
 	<!-- GNB탭 목록 -->
 	<select id="getGnbTabList" parameterType="GnbTab" resultType="GnbTab">
 		/* TsfDisplay.getGnbTabList */
@@ -73,6 +87,9 @@
 		    </otherwise>
 		</choose>
 		WHERE  GTAB_GB = #{gtabGb}
+		<if test='brandGroupNo != null and brandGroupNo == ""'>
+		AND    BRAND_GROUP_NO = #{brandGroupNo}
+		</if>
 		AND    USE_YN = 'Y'
 		<choose>
 		    <when test='preview != null and preview == "Y"'>

+ 97 - 0
src/main/webapp/WEB-INF/views/web/common/fragments/BrandGnbWeb.html

@@ -0,0 +1,97 @@
+<!DOCTYPE html>
+<html lang="ko"
+	  xmlns:th="http://www.thymeleaf.org">
+<!--
+ *******************************************************************************
+ * @source  : GnbWeb.html
+ * @desc    : GNB
+ *============================================================================
+ * STYLE24
+ * Copyright(C) 2020 TSIT, All rights reserved.
+ *============================================================================
+ * VER  DATE         AUTHOR      DESCRIPTION
+ * ===  ===========  ==========  =============================================
+ * 1.0  2021.01.28   gagamel     최초 작성
+ *******************************************************************************
+ -->
+<header id="header" th:fragment="gnb">
+
+	<div class="common_header br_header" th:style="${'background-color: #' + brandGroupInfo.rgbCd}">
+		<div class="area">
+			<div class="logo">
+				<a href="#none">
+					<h1><img th:src="${@environment.getProperty('domain.image') + brandGroupInfo.logoFileNm}" src="/images/pc/thumb/br_tbj_logo.png" alt="TBJ nearby"/></h1>
+				</a>
+			</div>
+			<div class="util_group">
+				<span><a href="javascript:void(0);" onclick="cfnGoToPage(_PAGE_MAIN);" title="STYLE24 홈화면 바로가기"><b>STYLE24</b></a></span>
+				<span th:if="${sessionInfo == null}"><a href="javascript:void(0);" onclick="cfnGoToPage(_PAGE_LOGIN);" title="로그인 바로가기">로그인</a></span>
+				<span th:if="${sessionInfo != null}"><a href="javascript:void(0);" onclick="cfnGoToPage(_PAGE_LOGOUT);" title="로그아웃">로그아웃</a></span>
+				<span th:if="${sessionInfo == null}"><a href="javascript:void(0);" onclick="cfnGoToPage(_PAGE_CUSTOMER_JOIN_TYPE);" title="회원가입 바로가기">회원가입</a></span>
+				<span><a href="javascript:void(0);" onclick="cfnGoToPage(_PAGE_MYPAGE);" title="마이페이지 바로가기">마이페이지</a></span>
+			</div>
+		</div>
+		<div class="gnb">
+			<!-- nav -->
+			<div class="nav">
+				<ul class="bundle" id="ulGnbTab">
+					<li><a href="#">상품</a></li>
+					<li><a href="#">룩북</a></li>
+					<li><a href="#">20S/S시즌오프</a></li>
+					<li><a href="#">이벤트</a></li>
+				</ul>
+			</div>
+			<!-- // nav -->
+			
+			<!-- search -->
+			<div class="search">
+				<button type="button" class="btn_open_search"><i class="ico ico_search"><em>통합검색 열기</em></i></button>
+				<a href="#" class="btn_ico btn_cart" title="장바구니 바로가기"><i class="ico ico_bag"></i><span class="circle_count">99+</span></a>
+			</div>
+			<!-- //search -->
+		</div>
+	</div>
+
+	<!-- 검색 레이어 -->
+	<div class="common_search">
+	</div>
+	<!-- //검색 레이어 -->
+
+<script th:inline="javascript">
+/*<![CDATA[*/
+	// GNB탭 생성
+	let fnCreateGnbTab = function() {
+		$.getJSON('/display/brand/gnb/tab/list/' + [[${brandGroupInfo.brandGroupNo}]]
+			, function(result, status) {
+				if (status == 'success') {
+					if (result.length > 0) {
+						$('#ulGnbTab').html('');
+						$.each(result, function(idx, item) {
+							/* if (item.contentsType == 'C' || item.contentsType == 'O') { // 컨텐츠유형:카테고리, 아울렛
+								$.each(allCate, function(allCateIdx, allCateItem) {
+									if (item.cate1No == allCateItem.cate1No) {
+										$('#ulGnbTab').append(gnbCate);
+									}
+								});
+							} else  */if (item.contentsType == 'L') { // 컨텐츠유형:링크
+								$('#ulGnbTab').append('<li><a href="' + item.linkUrl + '">' + item.gtabNm + '</a></li>');
+							}
+						});
+					}
+				}
+			});
+	}
+
+	$(document).ready(function() {
+		//검색창 호출
+		$(".common_search").load("sch_layer_pop.html");
+
+		// GNB탭 생성
+		fnCreateGnbTab();
+	});
+/*]]>*/
+</script>
+
+</header>
+
+</html>

+ 41 - 0
src/main/webapp/WEB-INF/views/web/common/layout/BrandLayoutWeb.html

@@ -0,0 +1,41 @@
+<!DOCTYPE html>
+<html lang="ko"
+	xmlns:th="http://www.thymeleaf.org"
+	xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout">
+
+<head th:replace="~{web/common/fragments/HeadWeb :: head}"></head>
+
+<body>
+
+<div class="skipComment">
+	<a href="#content">본문 바로가기</a>
+	<a href="#gnb">주메뉴 바로가기</a>
+	<a href="#footer">하단메뉴 바로가기</a>
+</div>
+	
+<th:block th:replace="~{web/common/fragments/VariablesWeb :: variables}"></th:block>
+
+<!-- GNB -->
+<header id="header" th:replace="~{web/common/fragments/BrandGnbWeb :: gnb}"></header>
+<!--// GNB -->
+
+<!-- CONTENT AREA -->
+<th:block layout:fragment="content"></th:block>
+<!-- // CONTENT AREA -->
+
+<!-- Footer -->
+<footer id="footer" th:replace="~{web/common/fragments/FooterWeb :: footer}"></footer>
+
+<th:block th:replace="~{web/common/fragments/ScriptsWeb :: scripts}"></th:block>
+<!-- <th:block th:replace="~{web/common/fragments/MarketingScripts :: mscripts}"></th:block> -->
+
+<script th:inline="javascript">
+/*<![CDATA[*/
+	$(document).ready(function() {
+		
+	});
+/*]]>*/
+</script>
+
+</body>
+</html>

+ 35 - 0
src/main/webapp/WEB-INF/views/web/display/BrandMainFormWeb.html

@@ -0,0 +1,35 @@
+<!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/BrandLayoutWeb">
+<!--
+ *******************************************************************************
+ * @source  : BrandMainFormWeb.html
+ * @desc    : 브랜드메인 Page
+ *============================================================================
+ * STYLE24
+ * Copyright(C) 2020 TSIT, All rights reserved.
+ *============================================================================
+ * VER  DATE         AUTHOR      DESCRIPTION
+ * ===  ===========  ==========  =============================================
+ * 1.0  2021.03.16   gagamel     최초 작성
+ *******************************************************************************
+ -->
+<body>
+
+<th:block layout:fragment="content">
+<div id="container" class="container brand_main">
+	<h1>브랜드 메인</h1>
+</div>
+
+<script th:inline="javascript">
+/*<![CDATA[*/
+	
+/*]]>*/
+</script>
+
+</th:block>
+
+</body>
+</html>