Bladeren bron

Merge branch 'develop' into bin2107

# Conflicts:
#	src/main/java/com/style24/front/biz/service/TsfGoodsService.java
bin2107 5 jaren geleden
bovenliggende
commit
86b073ba6e

+ 6 - 7
src/main/java/com/style24/front/biz/dao/TsfDisplayDao.java

@@ -13,7 +13,6 @@ 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.Goods;
 import com.style24.persistence.domain.GoodsSearch;
 import com.style24.persistence.domain.MainLayout;
 import com.style24.persistence.domain.Popup;
@@ -175,22 +174,22 @@ public interface TsfDisplayDao {
 	Collection<GoodsSearch> getCategoryFilterBenefit(Cate4Srch cate4Srch);
 
 	/**
-	 * 카테고리 별 상품 
-	 * @param
+	 * 카테고리 별 상품수
+	 * @param params - 검색엔진 정보
 	 * @return
 	 * @author bin2107
 	 * @date 2021. 4. 7
 	 */
-	int getCategoryGoodsCount(GoodsSearch goodsSearch);
+	int getCategoryGoodsCount(SearchEngine params);
 
 	/**
-	 * 카테고리 별 상품 리스트
-	 * @param
+	 * 카테고리별 상품 목록
+	 * @param params - 검색엔진 정보
 	 * @return
 	 * @author bin2107
 	 * @date 2021. 4. 8
 	 */
-	Collection<Goods> getCategoryGoodsList(GoodsSearch goodsSearch);
+	Collection<SearchEngine> getCategoryGoodsList(SearchEngine params);
 
 	/**
 	 * 몰메인 BESTITEM 카테고리 목록

+ 8 - 9
src/main/java/com/style24/front/biz/service/TsfDisplayService.java

@@ -509,26 +509,25 @@ public class TsfDisplayService {
 	}
 
 	/**
-	 * 카테고리 별 상품 
-	 * @param
+	 * 카테고리별 상품수
+	 * @param params - 검색엔진 정보
 	 * @return
 	 * @author bin2107
 	 * @date 2021. 4. 7
 	 */
-	public int getCategoryGoodsCount(GoodsSearch goodsSearch) {
-		return displayDao.getCategoryGoodsCount(goodsSearch);
+	public int getCategoryGoodsCount(SearchEngine params) {
+		return displayDao.getCategoryGoodsCount(params);
 	}
 
 	/**
-	 * 카테고리 별 상품 리스트
-	 * @param
+	 * 카테고리별 상품 목록
+	 * @param params - 검색엔진 정보
 	 * @return
 	 * @author bin2107
 	 * @date 2021. 4. 8
 	 */
-	public Collection<Goods> getCategoryGoodsList(GoodsSearch goodsSearch) {
-		Collection<Goods> goodsList = displayDao.getCategoryGoodsList(goodsSearch);
-		return goodsList;
+	public Collection<SearchEngine> getCategoryGoodsList(SearchEngine params) {
+		return displayDao.getCategoryGoodsList(params);
 	}
 
 	/**

+ 26 - 28
src/main/java/com/style24/front/biz/service/TsfGoodsService.java

@@ -22,7 +22,6 @@ import com.style24.persistence.domain.GoodsDesc;
 import com.style24.persistence.domain.GoodsImg;
 import com.style24.persistence.domain.GoodsNotiInfo;
 import com.style24.persistence.domain.GoodsSafeNo;
-import com.style24.persistence.domain.GoodsSearch;
 import com.style24.persistence.domain.GoodsStock;
 import com.style24.persistence.domain.GoodsVideo;
 import com.style24.persistence.domain.GoodsViewHst;
@@ -79,7 +78,7 @@ public class TsfGoodsService {
 			} else {
 				goodsViewHst.setReferer(referer);
 			}
-		} 
+		}
 
 		if (TsfSession.getInfo() != null) {
 			goodsViewHst.setCustNo(TsfSession.getInfo().getCustNo());
@@ -452,14 +451,14 @@ public class TsfGoodsService {
 		//String[][] arrGoodsStoreList = null;	// 상품코드, 매장코드, 상품별 주문수량
 
 		log.info("[getGoodsSetStockQty] goodsStock = {}", goodsStock);
-		
+
 		int ableOrderCnt = 0;
 		for (String arrGoodsCd : goodsStock.getArrGoodsOption()) {	// [{goodsCd|optCd|qty},{goodsCd|optCd|qty}]
 
 			String[] goodsSizeInfo = arrGoodsCd.split("\\|");
 			log.info("[getGoodsSetStockQty] goodsSizeInfo = {}", goodsSizeInfo);
 			if (goodsSizeInfo.length == 3) {
-				
+
 				GoodsStock tmpStock = new GoodsStock();
 				tmpStock.setGoodsCd(goodsSizeInfo[0]);
 				tmpStock.setOptCd(goodsSizeInfo[1]);
@@ -547,7 +546,7 @@ public class TsfGoodsService {
 	public Collection<Goods> getTmtbGoodsList(Goods goods) {
 		return goodsDao.getTmtbGoodsList(goods);
 	}
-	
+
 	/**
 	 * 상품 추천상품 목록
 	 * @param goods
@@ -558,7 +557,6 @@ public class TsfGoodsService {
 	public Collection<Goods> getRecommendGoodsList(Goods goods) {
 		return goodsDao.getRecommendGoodsList(goods);
 	}
-	
 
 	/**
 	 * 재입고 알림 미 알림 조회
@@ -730,7 +728,7 @@ public class TsfGoodsService {
 	public Collection<Tmtb> getTmtbList(Goods goods) {
 		return goodsDao.getTmtbList(goods);
 	}
-	
+
 	/**
 	 * 상품의 다다익선 목록 
 	 * @param goods
@@ -759,7 +757,7 @@ public class TsfGoodsService {
 
 		if (cate.getContentsLoc().equals("SCM002") || cate.getContentsLoc().equals("SBM007") || cate.getContentsLoc().equals("SMM003") || cate.getContentsLoc().equals("SBM003")) { // 신상품인 경우
 			int maxRow = 20;
-			if(cate.getContentsLoc().equals("SBM003")){
+			if (cate.getContentsLoc().equals("SBM003")) {
 				maxRow = 3;
 			}
 
@@ -791,36 +789,37 @@ public class TsfGoodsService {
 
 			// 추천솔루션 데이터가 없으면 베스트로 등록된 상품 조회
 			goodsList = goodsDao.getContentsCategoryGoodsList(cate);
-			for(Goods temp : goodsList){
-				if(temp.getSizes()!=null){
+			for (Goods temp : goodsList) {
+				if (temp.getSizes() != null) {
 					temp.setSizeArr(temp.getSizes().split(","));
 				}
-				if(temp.getColorChips()!=null){
+				if (temp.getColorChips() != null) {
 					temp.setColorArr(temp.getColorChips().split(","));
 				}
-				if(temp.getIcon()!=null){
+				if (temp.getIcon() != null) {
 					temp.setBenefitArr(temp.getIcon().split(","));
 				}
 			}
 		} else if (cate.getContentsLoc().equals("SBM013")) {
-			GoodsSearch goodsSearch = new GoodsSearch();
-			goodsSearch.setSiteCd(TscConstants.Site.STYLE24.value());
-			goodsSearch.setFormalGb(cate.getFormalGb());
-			goodsSearch.setCustGb(cate.getCustGb());
-			goodsSearch.setCustNo(cate.getCustNo());
-			goodsSearch.setBrandGroupNo(cate.getBrandGroupNo());
-			goodsSearch.setMaxRow(cate.getMaxRow());
-			goodsSearch.setContentsLoc(cate.getContentsLoc());
-			goodsList = displayDao.getCategoryGoodsList(goodsSearch);
-			
-			for(Goods temp : goodsList){
-				if(temp.getSizes()!=null){
+//			GoodsSearch goodsSearch = new GoodsSearch();
+//			goodsSearch.setSiteCd(TscConstants.Site.STYLE24.value());
+//			goodsSearch.setFormalGb(cate.getFormalGb());
+//			goodsSearch.setCustGb(cate.getCustGb());
+//			goodsSearch.setCustNo(cate.getCustNo());
+//			goodsSearch.setBrandGroupNo(cate.getBrandGroupNo());
+//			goodsSearch.setMaxRow(cate.getMaxRow());
+//			goodsSearch.setContentsLoc(cate.getContentsLoc());
+//			goodsList = displayDao.getCategoryGoodsList(goodsSearch);
+			goodsList = goodsDao.getContentsCategoryGoodsList(cate);
+
+			for (Goods temp : goodsList) {
+				if (temp.getSizes() != null) {
 					temp.setSizeArr(temp.getSizes().split(","));
 				}
-				if(temp.getColorChips()!=null){
+				if (temp.getColorChips() != null) {
 					temp.setColorArr(temp.getColorChips().split(","));
 				}
-				if(temp.getIcon()!=null){
+				if (temp.getIcon() != null) {
 					temp.setBenefitArr(temp.getIcon().split(","));
 				}
 			}
@@ -830,7 +829,7 @@ public class TsfGoodsService {
 
 		return goodsList;
 	}
-	
+
 	/**
 	 * ep쿠폰 다운 처리
 	 *
@@ -844,5 +843,4 @@ public class TsfGoodsService {
 		return couponService.createEpCoupon(goods);
 	}
 
-
 }

+ 28 - 31
src/main/java/com/style24/front/biz/web/TsfDisplayController.java

@@ -36,7 +36,6 @@ 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.GoodsSearch;
 import com.style24.persistence.domain.Login;
 import com.style24.persistence.domain.Lookbook;
 import com.style24.persistence.domain.MainLayout;
@@ -597,49 +596,47 @@ public class TsfDisplayController extends TsfBaseController {
 
 	/**
 	 * 카테고리 상품 리스트 조회
-	 * @param
+	 * @param params - 검색엔진 정보
 	 * @return
 	 * @author bin2107
 	 * @since 2021. 4. 7
 	 */
 	@PostMapping("/category/goods/list")
 	@ResponseBody
-	public GagaMap getGoodsList(@RequestBody GoodsSearch goodsSearch) {
+	public GagaMap getGoodsList(@RequestBody SearchEngine params) {
 		GagaMap result = new GagaMap();
-		log.info("getGoodsListgetGoodsListgetGoodsList::::{}", goodsSearch);
-		TscPageRequest pageable = new TscPageRequest((goodsSearch.getPageNo() > 0 ? goodsSearch.getPageNo() - 1 : 0), goodsSearch.getPageSize(), goodsSearch.getPageUnit());
+		log.info("getGoodsList's parameter::: {}", params);
+		TscPageRequest pageable = new TscPageRequest((params.getPageNo() > 0 ? params.getPageNo() - 1 : 0), params.getPageSize(), params.getPageUnit());
 
 		if (TsfSession.isLogin()) {
-			goodsSearch.setCustNo(TsfSession.getInfo().getCustNo());
+			params.setCustNo(TsfSession.getInfo().getCustNo());
 		}
 
-		goodsSearch.setSiteCd(TscConstants.Site.STYLE24.value());
-		goodsSearch.setFrontGb(TsfSession.getFrontGb());
-		goodsSearch.setCustGb(TsfSession.getCustGb());
+		params.setSiteCd(TscConstants.Site.STYLE24.value());
+		params.setFrontGb(TsfSession.getFrontGb());
+		params.setCustGb(TsfSession.getCustGb());
 
-		if (goodsSearch.getBrandGroupNo() == null || goodsSearch.getBrandGroupNo().equals("")) {
-			goodsSearch.setBrandGroupNo(0);
+		if (params.getBrandGroupNo() == null) {
+			params.setBrandGroupNo(0);
 		}
 
-		if (goodsSearch.getCate4No() != null && !goodsSearch.getCate4No().equals("")) {
-			goodsSearch.setCateNo(goodsSearch.getCate4No());
-		} else if (goodsSearch.getCate3No() != null && !goodsSearch.getCate3No().equals("")) {
-			goodsSearch.setCateNo(goodsSearch.getCate3No());
-		} else if (goodsSearch.getCate2No() != null && !goodsSearch.getCate2No().equals("")) {
-			goodsSearch.setCateNo(goodsSearch.getCate2No());
-		} else if (goodsSearch.getCate1No() != null && !goodsSearch.getCate1No().equals("")) {
-			goodsSearch.setCateNo(goodsSearch.getCate1No());
-		}
+//		if (params.getCate4No() != null && params.getCate4No() > 0) {
+//			params.setCateNo(params.getCate4No());
+//		} else if (params.getCate3No() != null && params.getCate3No() > 0) {
+//			params.setCateNo(params.getCate3No());
+//		} else if (params.getCate2No() != null && params.getCate2No() > 0) {
+//			params.setCateNo(params.getCate2No());
+//		} else if (params.getCate1No() != null && params.getCate1No() > 0) {
+//			params.setCateNo(params.getCate1No());
+//		}
+
+		pageable.setTotalCount(displayService.getCategoryGoodsCount(params));
+		params.setPageable(pageable);
+		result.set("paging", pageable);
+//		result.set("totalCnt", pageable.getTotalCount());
+//		result.set("endRow", pageable.getEndRow());
+		result.set("dataList", displayService.getCategoryGoodsList(params));
 
-		int totalCnt = displayService.getCategoryGoodsCount(goodsSearch);
-		log.info("totalCnt::::::::::{}", totalCnt);
-		pageable.setTotalCount(totalCnt);
-		goodsSearch.setPageable(pageable);
-		log.info("getEndRow:::::{}", pageable.getEndRow());
-		result.set("paging", goodsSearch);
-		result.set("totalCnt", totalCnt);
-		result.set("endRow", pageable.getEndRow());
-		result.set("dataList", displayService.getCategoryGoodsList(goodsSearch));
 		return result;
 	}
 
@@ -760,9 +757,9 @@ public class TsfDisplayController extends TsfBaseController {
 	@ResponseBody
 	public Collection<Contents> getGnbTabBannerlist(Contents contents) {
 //		contents.setContentsLoc("STAB003");
-		if(contents.getCateNo().equals(3000)){
+		if (contents.getCateNo().equals(3000)) {
 			contents.setContentsLoc("SOM005");
-		}else{
+		} else {
 			contents.setContentsLoc("SCM005");
 		}
 

+ 5 - 0
src/main/java/com/style24/persistence/domain/searchengine/SearchEngine.java

@@ -2,6 +2,8 @@ package com.style24.persistence.domain.searchengine;
 
 import java.io.Serializable;
 
+import com.style24.persistence.TscPageRequest;
+
 import lombok.Data;
 
 /**
@@ -18,6 +20,7 @@ public class SearchEngine implements Serializable {
 	private String siteCd;			// 사이트코드
 	private String cateGb;			// 카테고리구분
 	private String filterGb;		// 필터구분
+	private Integer custNo;			// 고객번호
 
 	private Integer cate1No;		// 카테고리1번호
 	private Integer cate2No;		// 카테고리2번호
@@ -46,6 +49,7 @@ public class SearchEngine implements Serializable {
 	private int pageNo = 1;			// 페이지번호
 	private int pageSize = 50;		// 페이지사이즈
 	private int pageUnit = 10;		// 페이지단위
+	private TscPageRequest pageable;
 
 	// Result - 상품리스트
 	private String brandGroupNm;	// 브랜드그룹명
@@ -60,6 +64,7 @@ public class SearchEngine implements Serializable {
 	private String colorChips;		// 컬러칩들(,로 연결된 문자열. 색상코드:컬러칩, ...)
 	private String sizes;			// 사이즈들(,로 연결된 문자열. 사이즈코드:품절여부, ...)
 	private String benefits;		// 혜택들(,로 연결된 문자열. 혜택구분:혜택명, ...)
+	private String likeIt;			// 좋아요(위시리스트에담긴상품)
 
 	private String adminIp;			// 검색엔진IP
 	private String adminPort;		// 검색엔진포트

+ 424 - 406
src/main/java/com/style24/persistence/mybatis/shop/TsfDisplay.xml

@@ -709,378 +709,395 @@
 		                    AND CATE5_NO = #{cate5No}
 		                  </if>
 		                )
-		<if test="brandGroupNo != null and brandGroupNo !=''">
-		  AND CG.BRAND_GROUP_NO = #{brandGroupNo}
+		<if test="brandGroupNo != null and brandGroupNo > 0">
+		AND   CG.BRAND_GROUP_NO = #{brandGroupNo}
 		</if>
 		GROUP BY GB.BENEFIT_GB
 	</select>
 
-	<!-- 카테고리별 상품 총 건수 new -->
-	<select id="getCategoryGoodsCount" parameterType="GoodsSearch" resultType="int">
+	<!-- 카테고리별 상품 총건수 -->
+	<select id="getCategoryGoodsCount" parameterType="SearchEngine" resultType="int">
 		/* TsfDisplay.getCategoryGoodsCount */
-		WITH TAB_GOODS AS (
-		      SELECT G.BRAND_GROUP_NM     /*브랜드그룹명*/
-		           , G.GOODS_CD           /*상품코드*/
-		           , G.GOODS_NM           /*상품명*/
-		           , G.GOODS_GB           /*상품구분*/
-		           , G.SELF_GOODS_YN      /*자사상품여부*/
-		           , 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         /*현재판매가*/
-		           , G.FORMAL_GB
-		           , G.REG_DT             /*등록일시*/
-		           , G.SELL_WEEK_QTY  /*주간판매수량*/
-		           , G.REVIEW_REG_CNT /*리뷰등록건수*/
-		      FROM   (
-		           SELECT 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.SELF_GOODS_YN                                                                      /*자사상품여부*/
-		                  , G.FOREIGN_BUY_YN                                                                     /*해외구매대행여부*/
-		                  , G.PARALLEL_IMPORT_YN                                                                 /*병행수입여부*/
-		                  , G.ORDER_MADE_YN                                                                      /*주문제작여부*/
-		                  , G.GOODS_TNM                                                                          /*상품타이틀명*/
-		                  , G.MAIN_COLOR_CD                                                                      /*대표색상코드*/
-		                  , G.LIST_PRICE                                                                         /*정상가(최초판매가)*/
-		                  , CASE WHEN #{frontGb} = 'P' AND #{custGb} = 'G100_20' THEN GBP.STAFF_PC_CURR_PRICE
-		                         WHEN #{frontGb} = 'M' AND #{custGb} = 'G100_20' THEN GBP.STAFF_MO_CURR_PRICE
-		                         WHEN #{frontGb} = 'A' AND #{custGb} = 'G100_20' THEN GBP.STAFF_APP_CURR_PRICE
-		                         WHEN #{frontGb} = 'P' AND #{custGb} != 'G100_20' THEN GBP.PC_CURR_PRICE
-		                         WHEN #{frontGb} = 'M' AND #{custGb} != 'G100_20' THEN GBP.MO_CURR_PRICE
-		                         WHEN #{frontGb} = 'A' AND #{custGb} != 'G100_20' THEN GBP.APP_CURR_PRICE
-		                         ELSE G.CURR_PRICE
-		                    END                                                   AS CURR_PRICE       /*현재판매가*/
-		                  , G.MIN_ORD_AMT                                                                        /*최수주문금액*/
-		                  , G.FORMAL_GB /*정상이월구분*/
-		                  , G.REG_DT                                                                             /*등록일시*/
-		                  , GS.SELL_WEEK_QTY  /*주간판매수량*/
-		                  , GS.REVIEW_REG_CNT /*리뷰등록건수*/
-		           FROM   TB_CATE_4SRCH C4
-		           INNER JOIN TB_CATE_GOODS CG ON C4.LEAF_CATE_NO = CG.CATE_NO
-		           INNER JOIN TB_GOODS G ON CG.GOODS_CD = G.GOODS_CD
-		           INNER JOIN TB_GOODS_STOCK S ON CG.GOODS_CD = S.GOODS_CD
-		           INNER JOIN TB_BRAND B ON G.BRAND_CD = B.BRAND_CD
-		           INNER JOIN TB_BRAND_GROUP BG ON B.BRAND_GROUP_NO = BG.BRAND_GROUP_NO
-		           INNER JOIN TB_GOODS_SUMMARY GS ON CG.GOODS_CD = GS.GOODS_CD
-		           LEFT OUTER JOIN TB_GOODS_BENEFIT_PRICE GBP ON CG.GOODS_CD = GBP.GOODS_CD
-		           WHERE  C4.SITE_CD = 'G000_10'
-		           AND    C4.CATE_GB = 'G032_101'
-		           AND    C4.CATE_TYPE = 'G031_10' /*상품카테고리*/
-		           <if test="cate1No != null and cate1No != ''">
-		           AND    C4.CATE1_NO = #{cate1No}
-		           </if>
-		           <if test="cate2No != null and cate2No != ''">
-		           AND    C4.CATE2_NO = #{cate2No}
-		           </if>
-		           <if test="cate3No != null and cate3No != ''">
-		           AND    C4.CATE3_NO = #{cate3No}
-		           </if>
-		           <if test="cate4No != null and cate4No != ''">
-		           AND    C4.CATE4_NO = #{cate4No}
-		           </if>
-		           <if test="cate5No != null and cate5No != ''">
-		           AND    C4.CATE5_NO = #{cate5No}
-		           </if>
-		           <choose>
-		               <when test="brandGroupNo != null and brandGroupNo != ''">
-		           AND    B.BRAND_GROUP_NO = #{brandGroupNo}
-		               </when>
-		               <otherwise>
-		           AND    CG.BRAND_GROUP_NO = 0 /*브랜드메인에서 접근한 것이 아니면*/
-		               </otherwise>
-		           </choose>
-		           <if test="formalGb != null and formalGb !=''">
-		           AND    G.FORMAL_GB = #{formalGb}
-		           </if>
-		           AND    G.GOODS_STAT = 'G008_90' /*승인완료상품*/
-		           AND    G.SELF_MALL_YN = 'Y' /*몰노출상품*/
-		           AND    NOW() BETWEEN G.SELL_STDT AND G.SELL_EDDT /*유효한 판매기간*/
-		           AND    S.STOCK_QTY > 0 /*재고있는 상품*/
-		           AND    B.USE_YN = 'Y' /*사용하는 브랜드*/
-		           AND    BG.USE_YN = 'Y' /*사용하는 브랜드그룹*/
-		           <if test="priceHigh != null and priceHigh != ''">
-		           AND    G.CURR_PRICE <![CDATA[<=]]> #{priceHigh}
-		           </if>
-		           <if test="priceRow != null and priceRow != ''">
-		           AND    G.CURR_PRICE <![CDATA[>=]]> #{priceRow}
-		           </if>
-		           <if test="dcrateHigh != null and dcrateHigh != ''">
-		           AND    G.DC_RATE <![CDATA[<=]]> #{dcrateHigh}
-		           </if>
-		           <if test="dcrateRow != null and dcrateRow != ''">
-		           AND    G.DC_RATE <![CDATA[>=]]> #{dcrateRow}
-		           </if>
-		           <if test="sexGb != null and sexGb != ''">
-		           AND    G.SEX_GB = #{sexGb}
-		           </if>
-		           <if test="newProd != null and newProd != ''">
-		           AND    EXISTS ( SELECT 1 FROM TB_GOODS_BENEFIT
-		                           WHERE GOODS_CD = G.GOODS_CD
-		                           AND BENEFIT_GB IN (#{newProd}) )
-		           </if>
-		           <include refid="getCategoryGoodsList_sql"/>
-		) G
+		SELECT COUNT(*)
+		FROM   (
+		        SELECT 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.SELF_GOODS_YN                        /*자사상품여부*/
+		             , G.FOREIGN_BUY_YN                       /*해외구매대행여부*/
+		             , G.PARALLEL_IMPORT_YN                   /*병행수입여부*/
+		             , G.ORDER_MADE_YN                        /*주문제작여부*/
+		             , G.GOODS_TNM                            /*상품타이틀명*/
+		             , G.MAIN_COLOR_CD                        /*대표색상코드*/
+		             , G.LIST_PRICE                           /*정상가(최초판매가)*/
+		             , CASE WHEN #{frontGb} = 'P' AND #{custGb} = 'G100_20' THEN GBP.STAFF_PC_CURR_PRICE
+		                    WHEN #{frontGb} = 'M' AND #{custGb} = 'G100_20' THEN GBP.STAFF_MO_CURR_PRICE
+		                    WHEN #{frontGb} = 'A' AND #{custGb} = 'G100_20' THEN GBP.STAFF_APP_CURR_PRICE
+		                    WHEN #{frontGb} = 'P' AND #{custGb} != 'G100_20' THEN GBP.PC_CURR_PRICE
+		                    WHEN #{frontGb} = 'M' AND #{custGb} != 'G100_20' THEN GBP.MO_CURR_PRICE
+		                    WHEN #{frontGb} = 'A' AND #{custGb} != 'G100_20' THEN GBP.APP_CURR_PRICE
+		                    ELSE G.CURR_PRICE
+		               END                  AS CURR_PRICE     /*현재판매가*/
+		             , G.MIN_ORD_AMT                          /*최소주문금액*/
+		             , G.FORMAL_GB                            /*정상이월구분*/
+		             , G.REG_DT                               /*등록일시*/
+		             , GS.SELL_WEEK_QTY                       /*주간판매수량*/
+		             , GS.REVIEW_REG_CNT                      /*리뷰등록건수*/
+		        FROM   TB_CATE_4SRCH C4
+		        INNER JOIN TB_CATE_GOODS CG ON C4.LEAF_CATE_NO = CG.CATE_NO
+		        INNER JOIN TB_GOODS G ON CG.GOODS_CD = G.GOODS_CD
+		        INNER JOIN TB_GOODS_STOCK S ON CG.GOODS_CD = S.GOODS_CD
+		        INNER JOIN TB_BRAND B ON G.BRAND_CD = B.BRAND_CD
+		        INNER JOIN TB_BRAND_GROUP BG ON B.BRAND_GROUP_NO = BG.BRAND_GROUP_NO
+		        INNER JOIN TB_GOODS_SUMMARY GS ON CG.GOODS_CD = GS.GOODS_CD
+		        LEFT OUTER JOIN TB_GOODS_BENEFIT_PRICE GBP ON CG.GOODS_CD = GBP.GOODS_CD
+		        WHERE  C4.SITE_CD = #{siteCd}
+		        AND    C4.CATE_GB = #{cateGb}
+		        AND    C4.CATE_TYPE = 'G031_10' /*상품카테고리*/
+		        <if test="cate1No != null and cate1No != ''">
+		        AND    C4.CATE1_NO = #{cate1No}
+		        </if>
+		        <if test="cate2No != null and cate2No != ''">
+		        AND    C4.CATE2_NO = #{cate2No}
+		        </if>
+		        <if test="cate3No != null and cate3No != ''">
+		        AND    C4.CATE3_NO = #{cate3No}
+		        </if>
+		        <if test="cate4No != null and cate4No != ''">
+		        AND    C4.CATE4_NO = #{cate4No}
+		        </if>
+		        <if test="cate5No != null and cate5No != ''">
+		        AND    C4.CATE5_NO = #{cate5No}
+		        </if>
+		        <choose>
+		            <when test="brandGroupNo != null and brandGroupNo > 0">
+		        AND    CG.BRAND_GROUP_NO = #{brandGroupNo}
+		            </when>
+		            <otherwise>
+		        AND    CG.BRAND_GROUP_NO = 0 /*브랜드메인에서 접근한 것이 아니면*/
+		            </otherwise>
+		        </choose>
+		        <if test="formalGb != null and formalGb !=''">
+		        AND    G.FORMAL_GB = #{formalGb}
+		        </if>
+		        AND    G.GOODS_STAT = 'G008_90' /*승인완료상품*/
+		        AND    G.SELF_MALL_YN = 'Y' /*몰노출상품*/
+		        AND    NOW() BETWEEN G.SELL_STDT AND G.SELL_EDDT /*유효한 판매기간*/
+		        <if test="ageArr != null and ageArr.length > 0"> <!-- 연령대 -->
+		        AND    G.AGE_GRP_CD IN
+		            <foreach collection="agesArr" item="item" index="index"  open="(" close=")" separator=",">
+		            #{item}
+		            </foreach>
+		        </if>
+		        <if test="seasonArr != null and seasonArr.length > 0"> <!-- 시즌 -->
+		        AND    G.SEASON_CD IN
+		            <foreach collection="seasonArr" item="item" index="index"  open="(" close=")" separator=",">
+		            #{item}
+		            </foreach>
+		        </if>
+		        AND    S.STOCK_QTY > 0 /*재고있는 상품*/
+		        AND    B.USE_YN = 'Y' /*사용하는 브랜드*/
+		        AND    BG.USE_YN = 'Y' /*사용하는 브랜드그룹*/
+		        <if test="brandGroupArr != null and brandGroupArr.length > 0">
+		        AND    BG.BRAND_GROUP_NO IN
+		            <foreach collection="brandGroupArr" item="item" index="index"  open="(" close=")" separator=",">
+		            #{item}
+		            </foreach>
+		        </if>
+		        <if test="unisex != null and unisex != ''">
+		        AND    G.SEX_GB = #{unisex}
+		        </if>
+		        <if test='sizeArr != null and sizeArr.length > 0'>
+		        AND    EXISTS (SELECT 1
+		                       FROM   TB_OPTION
+		                       WHERE  GOODS_CD = CG.GOODS_CD
+		                       AND    OPT_CD2 IN
+		                       <foreach collection="brandGroupArr" item="item" index="index"  open="(" close=")" separator=",">
+		                       #{item}
+		                       </foreach>
+		                       AND    DISP_YN = 'Y'
+		                      )
+		        </if>
+		        <if test="colorArr != null and colorArr.length > 0">
+		        AND    EXISTS (SELECT 1
+		                       FROM   TB_OPTION O
+		                            , TB_COLOR C
+		                       WHERE  O.GOODS_CD = G.GOODS_CD
+		                       AND    O.OPT_CD1 = C.COLOR_CD
+		                       AND    O.DISP_YN = 'Y'
+		                       AND    C.COLOR_GRP_CD IN
+		                       <foreach collection="colorArr" item="item" index="index"  open="(" close=")" separator=",">
+		                       #{item}
+		                       </foreach>
+		                       AND    C.USE_YN = 'Y' /*사용하는색상*/
+		                       AND    G.SELF_GOODS_YN = 'Y' /*자사상품만*/
+		                      )
+		        </if>
+		        <if test="newGoods != null and newGoods != ''">
+		        AND    EXISTS (SELECT 1
+		                       FROM   TB_GOODS_BENEFIT
+		                       WHERE  GOODS_CD = G.GOODS_CD
+		                       AND    BENEFIT_GB = #{newGoods}
+		                      )
+		        </if>
+		       ) G
 		WHERE  1 = 1
-		)
-		, TAB_OPTION AS (
-		      /* 자사상품 색상 목록 */
-		      SELECT O.GOODS_CD
-		      , O.OPT_CD1  AS MAIN_COLOR_CD
-		      FROM   TAB_GOODS G
-		      , TB_OPTION O
-		      WHERE  G.GOODS_CD = O.GOODS_CD
-		      AND    G.SELF_GOODS_YN = 'Y' /*자사상품만*/
-		      AND    O.DISP_YN = 'N'
-		      GROUP  BY O.GOODS_CD, O.OPT_CD1
-		)
-		, TAB_ALL_GOODS AS (
-		         SELECT *
-		         FROM   (
-		         SELECT G.BRAND_GROUP_NM
-		              , G.GOODS_CD
-		              , G.GOODS_NM           /*상품명*/
-		              , G.GOODS_GB           /*상품구분*/
-		              , G.SELF_GOODS_YN      /*자사상품여부*/
-		              , G.FOREIGN_BUY_YN     /*해외구매대행여부*/
-		              , G.PARALLEL_IMPORT_YN /*병행수입여부*/
-		              , G.ORDER_MADE_YN      /*주문제작여부*/
-		              , G.GOODS_TNM          /*상품타이틀명*/
-		              , IFNULL(O.MAIN_COLOR_CD,G.MAIN_COLOR_CD) AS MAIN_COLOR_CD /*대표색상코드*/
-		              , G.LIST_PRICE         /*정상가(최초판매가)*/
-		              , G.CURR_PRICE         /*현재판매가*/
-		              , G.FORMAL_GB
-		              , G.REG_DT             /*등록일시*/
-		              , G.SELL_WEEK_QTY
-		              , G.REVIEW_REG_CNT
-		              , RANK() OVER(ORDER BY G.FORMAL_GB
-		              , G.REG_DT DESC
-		              , G.GOODS_CD) AS NUMB
-		        FROM TAB_GOODS G
-		        LEFT OUTER JOIN TAB_OPTION O ON G.GOODS_CD = O.GOODS_CD
-		        ) ORIGINAL
-		)
-		, TAB_GOODS_IMG AS (
-		/* 상품의 이미지 */
-		     SELECT GOODS_CD
-		     ,MAX(SYS_IMG_NM)  AS SYS_IMG_NM
-		     ,MAX(SYS_IMG_NM2) AS SYS_IMG_NM2
-		     FROM   (
-		             SELECT G.GOODS_CD
-		             , CASE WHEN GI.DEFAULT_IMG_YN = 'Y' THEN GI.SYS_IMG_NM ELSE NULL END   AS SYS_IMG_NM
-		             , CASE WHEN GI.MOUSEOVER_IMG_YN = 'Y' THEN GI.SYS_IMG_NM ELSE NULL END AS SYS_IMG_NM2
-		             FROM   TAB_ALL_GOODS G
-		             , TB_GOODS_IMG GI
-		             WHERE  G.GOODS_CD = GI.GOODS_CD
-		             AND    G.MAIN_COLOR_CD = GI.COLOR_CD
-		     ) Z
-		GROUP  BY GOODS_CD
-		)
-		SELECT COUNT(1) AS TOTCNT
-		FROM TAB_ALL_GOODS G
-		LEFT OUTER JOIN TAB_GOODS_IMG GI ON G.GOODS_CD = GI.GOODS_CD
-	     <if test="custNo != null and custNo > 0"> <!-- 로그인 했으면 -->
-	     LEFT OUTER JOIN TB_WISHLIST W ON G.GOODS_CD = W.GOODS_CD
-	                                  AND W.CUST_NO = #{custNo}
-	     </if>
+		<if test="priceFrom != null and priceFrom != ''">
+		AND    G.CURR_PRICE <![CDATA[>=]]> #{priceFrom}
+		</if>
+		<if test="priceTo != null and priceTo != ''">
+		AND    G.CURR_PRICE <![CDATA[<=]]> #{priceTo}
+		</if>
+		<if test="dcRateFrom != null and dcRateFrom != ''">
+		AND    ((IF(G.LIST_PRICE = 0,0,G.LIST_PRICE) - G.CURR_PRICE) / IF(G.LIST_PRICE = 0,0,G.LIST_PRICE) * 100) <![CDATA[>=]]> #{dcRateFrom}
+		</if>
+		<if test="dcRateTo != null and dcRateTo != ''">
+		AND    ((IF(G.LIST_PRICE = 0,0,G.LIST_PRICE) - G.CURR_PRICE) / IF(G.LIST_PRICE = 0,0,G.LIST_PRICE) * 100) <![CDATA[<=]]> #{dcRateTo}
+		</if>
 	</select>
 
-	<!-- 카테고리별 상품 리스트 -->
-	<select id="getCategoryGoodsList" parameterType="GoodsSearch" resultType="Goods">
+	<!-- 카테고리별 상품 목록 -->
+	<select id="getCategoryGoodsList" parameterType="SearchEngine" resultType="SearchEngine">
 		/* TsfDisplay.getCategoryGoodsList */
 		WITH TAB_GOODS AS (
-		          SELECT G.BRAND_GROUP_NM     /*브랜드그룹명*/
-		               , G.GOODS_CD           /*상품코드*/
-		               , G.GOODS_NM           /*상품명*/
-		               , G.GOODS_GB           /*상품구분*/
-		               , G.SELF_GOODS_YN      /*자사상품여부*/
-		               , 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         /*현재판매가*/
-		               , G.FORMAL_GB
-		               , G.REG_DT             /*등록일시*/
-		               , G.SELL_WEEK_QTY  /*주간판매수량*/
-		               , G.REVIEW_REG_CNT /*리뷰등록건수*/
-		          FROM   (
-		                    SELECT 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.SELF_GOODS_YN                                                                      /*자사상품여부*/
-		                         , G.FOREIGN_BUY_YN                                                                     /*해외구매대행여부*/
-		                         , G.PARALLEL_IMPORT_YN                                                                 /*병행수입여부*/
-		                         , G.ORDER_MADE_YN                                                                      /*주문제작여부*/
-		                         , G.GOODS_TNM                                                                          /*상품타이틀명*/
-		                         , G.MAIN_COLOR_CD                                                                      /*대표색상코드*/
-		                         , G.LIST_PRICE                                                                         /*정상가(최초판매가)*/
-		                         , CASE WHEN #{frontGb} = 'P' AND #{custGb} = 'G100_20' THEN GBP.STAFF_PC_CURR_PRICE
-		                                WHEN #{frontGb} = 'M' AND #{custGb} = 'G100_20' THEN GBP.STAFF_MO_CURR_PRICE
-		                                WHEN #{frontGb} = 'A' AND #{custGb} = 'G100_20' THEN GBP.STAFF_APP_CURR_PRICE
-		                                WHEN #{frontGb} = 'P' AND #{custGb} != 'G100_20' THEN GBP.PC_CURR_PRICE
-		                                WHEN #{frontGb} = 'M' AND #{custGb} != 'G100_20' THEN GBP.MO_CURR_PRICE
-		                                WHEN #{frontGb} = 'A' AND #{custGb} != 'G100_20' THEN GBP.APP_CURR_PRICE
-		                                ELSE G.CURR_PRICE
-		                           END                                                   AS CURR_PRICE       /*현재판매가*/
-		                         , G.MIN_ORD_AMT                                                                        /*최수주문금액*/
-		                         , G.FORMAL_GB /*정상이월구분*/
-		                         , G.REG_DT                                                                             /*등록일시*/
-		                         , GS.SELL_WEEK_QTY  /*주간판매수량*/
-		                         , GS.REVIEW_REG_CNT /*리뷰등록건수*/
-		                    FROM   TB_CATE_4SRCH C4
-		                    INNER JOIN TB_CATE_GOODS CG ON C4.LEAF_CATE_NO = CG.CATE_NO
-		                    INNER JOIN TB_GOODS G ON CG.GOODS_CD = G.GOODS_CD
-		                    INNER JOIN TB_GOODS_STOCK S ON CG.GOODS_CD = S.GOODS_CD
-		                    INNER JOIN TB_BRAND B ON G.BRAND_CD = B.BRAND_CD
-		                    INNER JOIN TB_BRAND_GROUP BG ON B.BRAND_GROUP_NO = BG.BRAND_GROUP_NO
-		                    INNER JOIN TB_GOODS_SUMMARY GS ON CG.GOODS_CD = GS.GOODS_CD
-		                    LEFT OUTER JOIN TB_GOODS_BENEFIT_PRICE GBP ON CG.GOODS_CD = GBP.GOODS_CD
-		                    WHERE  C4.SITE_CD = 'G000_10'
-		                    AND    C4.CATE_GB = 'G032_101'
-		                    AND    C4.CATE_TYPE = 'G031_10' /*상품카테고리*/
-		                <if test="cate1No != null and cate1No != ''">
-		                    AND    C4.CATE1_NO = #{cate1No}
-		                </if>
-		                <if test="cate2No != null and cate2No != ''">
-		                    AND    C4.CATE2_NO = #{cate2No}
-		                </if>
-		                <if test="cate3No != null and cate3No != ''">
-		                    AND    C4.CATE3_NO = #{cate3No}
-		                </if>
-		                <if test="cate4No != null and cate4No != ''">
-		                    AND    C4.CATE4_NO = #{cate4No}
-		                </if>
-		                <if test="cate5No != null and cate5No != ''">
-		                    AND    C4.CATE5_NO = #{cate5No}
-		                </if>
-		                <choose>
-		                    <when test="brandGroupNo != null and brandGroupNo != ''">
-		                    AND    B.BRAND_GROUP_NO = #{brandGroupNo}
-		                    </when>
-		                    <otherwise>
-		                    AND    CG.BRAND_GROUP_NO = 0 /*브랜드메인에서 접근한 것이 아니면*/
-		                    </otherwise>
-		                </choose>
-		                <if test="formalGb != null and formalGb !=''">
-		                    AND    G.FORMAL_GB = #{formalGb}
-		                </if>
-		                    AND    G.GOODS_STAT = 'G008_90' /*승인완료상품*/
-		                    AND    G.SELF_MALL_YN = 'Y' /*몰노출상품*/
-		                    AND    NOW() BETWEEN G.SELL_STDT AND G.SELL_EDDT /*유효한 판매기간*/
-		                    AND    S.STOCK_QTY > 0 /*재고있는 상품*/
-		                    AND    B.USE_YN = 'Y' /*사용하는 브랜드*/
-		                    AND    BG.USE_YN = 'Y' /*사용하는 브랜드그룹*/
-		                <if test="priceHigh != null and priceHigh != ''">
-		                    AND    G.CURR_PRICE <![CDATA[<=]]> #{priceHigh}
-		                </if>
-		                <if test="priceRow != null and priceRow != ''">
-		                    AND    G.CURR_PRICE <![CDATA[>=]]> #{priceRow}
-		                </if>
-		                <if test="dcrateHigh != null and dcrateHigh != ''">
-		                    AND    G.DC_RATE <![CDATA[<=]]> #{dcrateHigh}
-		                </if>
-		                <if test="dcrateRow != null and dcrateRow != ''">
-		                    AND    G.DC_RATE <![CDATA[>=]]> #{dcrateRow}
-		                </if>
-		                <if test="sexGb != null and sexGb != ''">
-		                    AND    G.SEX_GB = #{sexGb}
-		                </if>
-		                <if test="newProd != null and newProd != ''">
-		                    AND    EXISTS ( SELECT 1 FROM TB_GOODS_BENEFIT
-		                                    WHERE GOODS_CD = G.GOODS_CD
-		                                    AND BENEFIT_GB IN (#{newProd})
-		                        )
-		                </if>
-		                <include refid="getCategoryGoodsList_sql"/>
-		                ) G
-		          WHERE  1 = 1
+		    SELECT G.BRAND_GROUP_NM     /*브랜드그룹명*/
+		         , G.GOODS_CD           /*상품코드*/
+		         , G.GOODS_NM           /*상품명*/
+		         , G.GOODS_GB           /*상품구분*/
+		         , G.SELF_GOODS_YN      /*자사상품여부*/
+		         , 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         /*현재판매가*/
+		         , G.FORMAL_GB          /*정상이월구분*/
+		         , G.REG_DT             /*등록일시*/
+		         , G.SELL_WEEK_QTY      /*주간판매수량*/
+		         , G.REVIEW_REG_CNT     /*리뷰등록건수*/
+		    FROM   (
+		            SELECT 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.SELF_GOODS_YN                         /*자사상품여부*/
+		                 , G.FOREIGN_BUY_YN                        /*해외구매대행여부*/
+		                 , G.PARALLEL_IMPORT_YN                    /*병행수입여부*/
+		                 , G.ORDER_MADE_YN                         /*주문제작여부*/
+		                 , G.GOODS_TNM                             /*상품타이틀명*/
+		                 , G.MAIN_COLOR_CD                         /*대표색상코드*/
+		                 , G.LIST_PRICE                            /*정상가(최초판매가)*/
+		                 , CASE WHEN #{frontGb} = 'P' AND #{custGb} = 'G100_20' THEN GBP.STAFF_PC_CURR_PRICE
+		                        WHEN #{frontGb} = 'M' AND #{custGb} = 'G100_20' THEN GBP.STAFF_MO_CURR_PRICE
+		                        WHEN #{frontGb} = 'A' AND #{custGb} = 'G100_20' THEN GBP.STAFF_APP_CURR_PRICE
+		                        WHEN #{frontGb} = 'P' AND #{custGb} != 'G100_20' THEN GBP.PC_CURR_PRICE
+		                        WHEN #{frontGb} = 'M' AND #{custGb} != 'G100_20' THEN GBP.MO_CURR_PRICE
+		                        WHEN #{frontGb} = 'A' AND #{custGb} != 'G100_20' THEN GBP.APP_CURR_PRICE
+		                        ELSE G.CURR_PRICE
+		                   END                   AS CURR_PRICE     /*현재판매가*/
+		                 , G.MIN_ORD_AMT                           /*최소주문금액*/
+		                 , G.FORMAL_GB                             /*정상이월구분*/
+		                 , G.REG_DT                                /*등록일시*/
+		                 , GS.SELL_WEEK_QTY                        /*주간판매수량*/
+		                 , GS.REVIEW_REG_CNT                       /*리뷰등록건수*/
+		            FROM   TB_CATE_4SRCH C4
+		            INNER JOIN TB_CATE_GOODS CG ON C4.LEAF_CATE_NO = CG.CATE_NO
+		            INNER JOIN TB_GOODS G ON CG.GOODS_CD = G.GOODS_CD
+		            INNER JOIN TB_GOODS_STOCK S ON CG.GOODS_CD = S.GOODS_CD
+		            INNER JOIN TB_BRAND B ON G.BRAND_CD = B.BRAND_CD
+		            INNER JOIN TB_BRAND_GROUP BG ON B.BRAND_GROUP_NO = BG.BRAND_GROUP_NO
+		            INNER JOIN TB_GOODS_SUMMARY GS ON CG.GOODS_CD = GS.GOODS_CD
+		            LEFT OUTER JOIN TB_GOODS_BENEFIT_PRICE GBP ON CG.GOODS_CD = GBP.GOODS_CD
+		            WHERE  C4.SITE_CD = #{siteCd}
+		            AND    C4.CATE_GB = #{cateGb}
+		            AND    C4.CATE_TYPE = 'G031_10' /*상품카테고리*/
+		            <if test="cate1No != null and cate1No != ''">
+		            AND    C4.CATE1_NO = #{cate1No}
+		            </if>
+		            <if test="cate2No != null and cate2No != ''">
+		            AND    C4.CATE2_NO = #{cate2No}
+		            </if>
+		            <if test="cate3No != null and cate3No != ''">
+		            AND    C4.CATE3_NO = #{cate3No}
+		            </if>
+		            <if test="cate4No != null and cate4No != ''">
+		            AND    C4.CATE4_NO = #{cate4No}
+		            </if>
+		            <if test="cate5No != null and cate5No != ''">
+		            AND    C4.CATE5_NO = #{cate5No}
+		            </if>
+		            <choose>
+		                <when test="brandGroupNo != null and brandGroupNo > 0">
+		            AND    CG.BRAND_GROUP_NO = #{brandGroupNo}
+		                </when>
+		                <otherwise>
+		            AND    CG.BRAND_GROUP_NO = 0 /*브랜드메인에서 접근한 것이 아니면*/
+		                </otherwise>
+		            </choose>
+		            <if test="formalGb != null and formalGb !=''">
+		            AND    G.FORMAL_GB = #{formalGb}
+		            </if>
+		            AND    G.GOODS_STAT = 'G008_90' /*승인완료상품*/
+		            AND    G.SELF_MALL_YN = 'Y' /*몰노출상품*/
+		            AND    NOW() BETWEEN G.SELL_STDT AND G.SELL_EDDT /*유효한 판매기간*/
+		            <if test="ageArr != null and ageArr.length > 0"> <!-- 연령대 -->
+		            AND    G.AGE_GRP_CD IN
+		                <foreach collection="agesArr" item="item" index="index"  open="(" close=")" separator=",">
+		                #{item}
+		                </foreach>
+		            </if>
+		            <if test="seasonArr != null and seasonArr.length > 0"> <!-- 시즌 -->
+		            AND    G.SEASON_CD IN
+		                <foreach collection="seasonArr" item="item" index="index"  open="(" close=")" separator=",">
+		                #{item}
+		                </foreach>
+		            </if>
+		            AND    S.STOCK_QTY > 0 /*재고있는 상품*/
+		            AND    B.USE_YN = 'Y' /*사용하는 브랜드*/
+		            AND    BG.USE_YN = 'Y' /*사용하는 브랜드그룹*/
+		            <if test="brandGroupArr != null and brandGroupArr.length > 0">
+		            AND    BG.BRAND_GROUP_NO IN
+		                <foreach collection="brandGroupArr" item="item" index="index"  open="(" close=")" separator=",">
+		                #{item}
+		                </foreach>
+		            </if>
+		            <if test="unisex != null and unisex != ''">
+		            AND    G.SEX_GB = #{unisex}
+		            </if>
+		            <if test='sizeArr != null and sizeArr.length > 0'>
+		            AND    EXISTS (SELECT 1
+		                           FROM   TB_OPTION
+		                           WHERE  GOODS_CD = CG.GOODS_CD
+		                           AND    OPT_CD2 IN
+		                           <foreach collection="brandGroupArr" item="item" index="index"  open="(" close=")" separator=",">
+		                           #{item}
+		                           </foreach>
+		                           AND    DISP_YN = 'Y'
+		                          )
+		            </if>
+		            <if test="newGoods != null and newGoods != ''">
+		            AND    EXISTS (SELECT 1
+		                           FROM   TB_GOODS_BENEFIT
+		                           WHERE  GOODS_CD = G.GOODS_CD
+		                           AND    BENEFIT_GB = #{newGoods}
+		                          )
+		            </if>
+		           ) G
+		    WHERE  1 = 1
+		    <if test="priceFrom != null and priceFrom != ''">
+		    AND    G.CURR_PRICE <![CDATA[>=]]> #{priceFrom}
+		    </if>
+		    <if test="priceTo != null and priceTo != ''">
+		    AND    G.CURR_PRICE <![CDATA[<=]]> #{priceTo}
+		    </if>
+		    <if test="dcRateFrom != null and dcRateFrom != ''">
+		    AND    ((IF(G.LIST_PRICE = 0,0,G.LIST_PRICE) - G.CURR_PRICE) / IF(G.LIST_PRICE = 0,0,G.LIST_PRICE) * 100) <![CDATA[>=]]> #{dcRateFrom}
+		    </if>
+		    <if test="dcRateTo != null and dcRateTo != ''">
+		    AND    ((IF(G.LIST_PRICE = 0,0,G.LIST_PRICE) - G.CURR_PRICE) / IF(G.LIST_PRICE = 0,0,G.LIST_PRICE) * 100) <![CDATA[<=]]> #{dcRateTo}
+		    </if>
 		)
 		, TAB_OPTION AS (
-		          /* 자사상품 색상 목록 */
-		          SELECT O.GOODS_CD
-		          , O.OPT_CD1  AS MAIN_COLOR_CD
-		          FROM   TAB_GOODS G
-		          , TB_OPTION O
-		          WHERE  G.GOODS_CD = O.GOODS_CD
-		          AND    G.SELF_GOODS_YN = 'Y' /*자사상품만*/
-		          AND    O.DISP_YN = 'N'
-		          GROUP  BY O.GOODS_CD, O.OPT_CD1
+		        /* 자사상품 색상 목록 */
+		    SELECT O.GOODS_CD
+		         , O.OPT_CD1  AS MAIN_COLOR_CD
+		    FROM   TAB_GOODS G
+		         , TB_OPTION O
+		    WHERE  G.GOODS_CD = O.GOODS_CD
+		    AND    G.SELF_GOODS_YN = 'Y' /*자사상품만*/
+		    <if test="colorArr != null and colorArr.length > 0"> <!-- 색상 -->
+		    AND    O.OPT_CD1 IN (SELECT COLOR_CD
+		                         FROM   TB_COLOR
+		                         WHERE  1 = 1
+		                         AND    COLOR_GRP_CD IN
+		                         <foreach collection="colorArr" item="item" index="index"  open="(" close=")" separator=",">
+		                         #{item}
+		                         </foreach>
+		                         AND    USE_YN = 'Y' /*사용하는색상*/
+		                        )
+		    </if>
+		    AND    O.DISP_YN = 'Y'
+		    GROUP  BY O.GOODS_CD, O.OPT_CD1
 		)
 		, TAB_ALL_GOODS AS (
-		        SELECT *
-		        FROM   (
-		                 SELECT G.BRAND_GROUP_NM
-		                 , G.GOODS_CD
-		                 , G.GOODS_NM           /*상품명*/
-		                 , G.GOODS_GB           /*상품구분*/
-		                 , G.SELF_GOODS_YN      /*자사상품여부*/
-		                 , G.FOREIGN_BUY_YN     /*해외구매대행여부*/
-		                 , G.PARALLEL_IMPORT_YN /*병행수입여부*/
-		                 , G.ORDER_MADE_YN      /*주문제작여부*/
-		                 , G.GOODS_TNM          /*상품타이틀명*/
+		    SELECT BRAND_GROUP_NM     /*브랜드그룹명*/
+		         , GOODS_CD           /*상품코드*/
+		         , GOODS_NM           /*상품명*/
+		         , GOODS_GB           /*상품구분*/
+		         , SELF_GOODS_YN      /*자사상품여부*/
+		         , FOREIGN_BUY_YN     /*해외구매대행여부*/
+		         , PARALLEL_IMPORT_YN /*병행수입여부*/
+		         , ORDER_MADE_YN      /*주문제작여부*/
+		         , GOODS_TNM          /*상품타이틀명*/
+		         , MAIN_COLOR_CD      /*대표색상코드*/
+		         , LIST_PRICE         /*정상가(최초판매가)*/
+		         , CURR_PRICE         /*현재판매가*/
+		         , FORMAL_GB          /*정상이월구분*/
+		         , REG_DT             /*등록일시*/
+		         , SELL_WEEK_QTY      /*주간판매수량*/
+		         , REVIEW_REG_CNT     /*리뷰등록건수*/
+		         , NUMB
+		    FROM   (
+		            SELECT G.BRAND_GROUP_NM                                         /*브랜드그룹명*/
+		                 , G.GOODS_CD                                               /*상품코드*/
+		                 , G.GOODS_NM                                               /*상품명*/
+		                 , G.GOODS_GB                                               /*상품구분*/
+		                 , G.SELF_GOODS_YN                                          /*자사상품여부*/
+		                 , G.FOREIGN_BUY_YN                                         /*해외구매대행여부*/
+		                 , G.PARALLEL_IMPORT_YN                                     /*병행수입여부*/
+		                 , G.ORDER_MADE_YN                                          /*주문제작여부*/
+		                 , G.GOODS_TNM                                              /*상품타이틀명*/
 		                 , IFNULL(O.MAIN_COLOR_CD,G.MAIN_COLOR_CD) AS MAIN_COLOR_CD /*대표색상코드*/
-		                 , G.LIST_PRICE         /*정상가(최초판매가)*/
-		                 , G.CURR_PRICE         /*현재판매가*/
-		                 , G.FORMAL_GB
-		                 , G.REG_DT             /*등록일시*/
-		                 , G.SELL_WEEK_QTY
-		                 , G.REVIEW_REG_CNT
+		                 , G.LIST_PRICE                                             /*정상가(최초판매가)*/
+		                 , G.CURR_PRICE                                             /*현재판매가*/
+		                 , G.FORMAL_GB                                              /*정상이월구분*/
+		                 , G.REG_DT                                                 /*등록일시*/
+		                 , G.SELL_WEEK_QTY                                          /*주간판매수량*/
+		                 , G.REVIEW_REG_CNT                                         /*리뷰등록건수*/
 		                 <choose>
-		                    <when test="sortGb != null and sortGb !=''">
-		                        <choose>
-		                           <when test="sortGb == 'new'">
-		                 , RANK() OVER(ORDER BY G.FORMAL_GB , G.REG_DT DESC , G.GOODS_CD) AS NUMB
-		                           </when>
-		                           <when test="sortGb == 'best'">
-		                 , RANK() OVER(ORDER BY G.FORMAL_GB , G.SELL_WEEK_QTY DESC , G.REG_DT DESC, G.GOODS_CD) AS NUMB
-		                           </when>
-		                           <when test="sortGb == 'review'">
-		                 , RANK() OVER(ORDER BY G.FORMAL_GB , G.REVIEW_REG_CNT DESC , G.REG_DT DESC, G.GOODS_CD) AS NUMB
-		                           </when>
-		                        </choose>
-		                    </when>
-		                    <otherwise>
-		                 , RANK() OVER(ORDER BY G.FORMAL_GB , G.REG_DT DESC , G.GOODS_CD) AS NUMB
-		                    </otherwise>
+		                     <when test="sortingType == 'BEST'"> <!-- 인기상품순 -->
+		                 , RANK() OVER(ORDER BY G.FORMAL_GB, G.SELL_WEEK_QTY DESC, G.GOODS_CD) AS NUMB
+		                     </when>
+		                     <when test="sortingType == 'REVIEW'"> <!-- 리뷰많은순 -->
+		                 , RANK() OVER(ORDER BY G.FORMAL_GB, G.REVIEW_REG_CNT DESC, G.GOODS_CD) AS NUMB
+		                     </when>
+		                     <otherwise> <!-- 최신상품순 -->
+		                 , RANK() OVER(ORDER BY G.FORMAL_GB, G.REG_DT DESC, G.GOODS_CD) AS NUMB
+		                     </otherwise>
 		                 </choose>
-		                 FROM TAB_GOODS G
-		                 LEFT OUTER JOIN TAB_OPTION O ON G.GOODS_CD = O.GOODS_CD
-		        ) ORIGINAL
-		        WHERE 1=1
-		        <if test="pageable != null and pageable.endRow != null and pageable.endRow > 0">
-		        	AND  NUMB BETWEEN #{pageable.startRow} AND #{pageable.endRow}
-		        </if>
-		        <if test="maxRow != null and maxRow !=''">
-		        	AND  NUMB <![CDATA[<=]]> #{maxRow}
-		        </if>
+		            FROM   TAB_GOODS G
+		            LEFT OUTER JOIN TAB_OPTION O ON G.GOODS_CD = O.GOODS_CD
+		           ) ORIGINAL
+		    WHERE  1 = 1
+		    <if test="pageable != null and pageable.endRow != null and pageable.endRow > 0">
+		    AND    NUMB BETWEEN #{pageable.startRow} AND #{pageable.endRow}
+		    </if>
 		)
 		, TAB_GOODS_IMG AS (
-		         /* 상품의 이미지 */
-		         SELECT GOODS_CD
-		                ,MAX(SYS_IMG_NM)  AS SYS_IMG_NM
-		                ,MAX(SYS_IMG_NM2) AS SYS_IMG_NM2
-		         FROM   (
-		                SELECT G.GOODS_CD
-		                , CASE WHEN GI.DEFAULT_IMG_YN = 'Y' THEN GI.SYS_IMG_NM ELSE NULL END   AS SYS_IMG_NM
-		                , CASE WHEN GI.MOUSEOVER_IMG_YN = 'Y' THEN GI.SYS_IMG_NM ELSE NULL END AS SYS_IMG_NM2
-		                FROM   TAB_ALL_GOODS G
-		                , TB_GOODS_IMG GI
-		                WHERE  G.GOODS_CD = GI.GOODS_CD
-		                AND    G.MAIN_COLOR_CD = GI.COLOR_CD
-		         ) Z
-		         GROUP  BY GOODS_CD
+		    /* 상품의 이미지 */
+		    SELECT GOODS_CD
+		         , MAX(SYS_IMG_NM)  AS SYS_IMG_NM
+		         , MAX(SYS_IMG_NM2) AS SYS_IMG_NM2
+		    FROM   (
+		            SELECT G.GOODS_CD
+		                 , CASE WHEN GI.DEFAULT_IMG_YN = 'Y' THEN GI.SYS_IMG_NM ELSE NULL END   AS SYS_IMG_NM
+		                 , CASE WHEN GI.MOUSEOVER_IMG_YN = 'Y' THEN GI.SYS_IMG_NM ELSE NULL END AS SYS_IMG_NM2
+		            FROM   TAB_ALL_GOODS G
+		                 , TB_GOODS_IMG GI
+		            WHERE  G.GOODS_CD = GI.GOODS_CD
+		            AND    G.MAIN_COLOR_CD = GI.COLOR_CD
+		           ) Z
+		    GROUP  BY GOODS_CD
 		)
 		SELECT G.BRAND_GROUP_NM
 		     , G.GOODS_CD
@@ -1088,73 +1105,74 @@
 		     , G.GOODS_TNM
 		     , G.MAIN_COLOR_CD
 		     , G.LIST_PRICE
-		     , G.CURR_PRICE                                                                                                  /*현재판매가*/
+		     , G.CURR_PRICE
 		     , GI.SYS_IMG_NM
 		     , GI.SYS_IMG_NM2
 		     , (
-		           SELECT GROUP_CONCAT(CONCAT(VIDEO_GB,':',KMC_KEY) ORDER BY NUMB SEPARATOR ',')
-		           FROM   (
-		                  SELECT GV.VIDEO_GB
-		                  , GV.KMC_KEY
-		                  , GV.REG_DT
-		                  , RANK() OVER(ORDER BY GV.REG_DT, GV.KMC_KEY) AS NUMB
-		                  FROM   TB_GOODS_VIDEO GV
-		                  WHERE  GV.GOODS_CD = G.GOODS_CD
-		                  AND    GV.DISP_YN = 'Y'
-		                  AND    GV.KMC_KEY IS NOT NULL
-		           ) Z
-		           WHERE  NUMB <![CDATA[<=]]>  2
-		     ) AS VIDEO_VAL
+		        SELECT GROUP_CONCAT(CONCAT(VIDEO_GB,':',KMC_KEY) ORDER BY NUMB SEPARATOR ',')
+		        FROM   (
+		                SELECT GV.VIDEO_GB
+		                     , GV.KMC_KEY
+		                     , GV.REG_DT
+		                     , RANK() OVER(ORDER BY GV.REG_DT, GV.KMC_KEY) AS NUMB
+		                FROM   TB_GOODS_VIDEO GV
+		                WHERE  GV.GOODS_CD = G.GOODS_CD
+		                AND    GV.DISP_YN = 'Y'
+		                AND    GV.KMC_KEY IS NOT NULL
+		               ) Z
+		        WHERE  NUMB <![CDATA[<=]]> 2
+		       ) AS VIDEOS
 		     , (
-		           SELECT GROUP_CONCAT(DISTINCT CONCAT(C.COLOR_CD,':',CC.CD_DESC) ORDER BY CC.DISP_ORD SEPARATOR ',') AS COLOR_CHIPS
-		           FROM   TB_OPTION O
-		           , TB_COLOR C
-		           , TB_COMMON_CODE CC
-		           WHERE  O.OPT_CD1 = C.COLOR_CD
-		           AND    C.COLOR_GRP_CD = CC.CD
-		           AND    O.GOODS_CD = G.GOODS_CD
-		           AND    O.DISP_YN = 'Y'
-		           AND    C.USE_YN = 'Y'
-		           AND    CC.USE_YN = 'Y'
-		     ) AS COLOR_CHIPS /*컬러칩*/
+		        SELECT GROUP_CONCAT(DISTINCT CONCAT(C.COLOR_CD,':',CC.CD_DESC) ORDER BY CC.DISP_ORD SEPARATOR ',') AS COLOR_CHIPS
+		        FROM   TB_OPTION O
+		             , TB_COLOR C
+		             , TB_COMMON_CODE CC
+		        WHERE  O.OPT_CD1 = C.COLOR_CD
+		        AND    C.COLOR_GRP_CD = CC.CD
+		        AND    O.GOODS_CD = G.GOODS_CD
+		        AND    O.DISP_YN = 'Y'
+		        AND    C.USE_YN = 'Y'
+		        AND    CC.USE_YN = 'Y'
+		       ) AS COLOR_CHIPS /*컬러칩*/
 		     , (
-		           SELECT GROUP_CONCAT(DISTINCT CONCAT(OPT_CD2 ,':' ,CASE WHEN SOLDOUT_YN = 'Y' THEN 'Y'
-		                               ELSE CASE WHEN CURR_STOCK_QTY - BASE_STOCK_QTY > 0 THEN 'N' ELSE 'Y'  END END) ORDER BY DISP_ORD SEPARATOR ',') AS SIZES
-		           FROM   VW_STOCK
-		           WHERE  GOODS_CD = G.GOODS_CD
-		           AND    OPT_CD1 = G.MAIN_COLOR_CD
-		           AND    DISP_YN = 'Y'
-		     ) AS SIZES /*사이즈*/
+		        SELECT GROUP_CONCAT(DISTINCT CONCAT(OPT_CD2 ,':' ,CASE WHEN SOLDOUT_YN = 'Y' THEN 'Y'
+		                                                               ELSE CASE WHEN CURR_STOCK_QTY - BASE_STOCK_QTY > 0 THEN 'N' ELSE 'Y' END
+		                                                          END) ORDER BY DISP_ORD SEPARATOR ',') AS SIZES
+		        FROM   VW_STOCK
+		        WHERE  GOODS_CD = G.GOODS_CD
+		        AND    OPT_CD1 = G.MAIN_COLOR_CD
+		        AND    DISP_YN = 'Y'
+		       ) AS SIZES /*사이즈*/
 		     , (
-		          SELECT GROUP_CONCAT(CONCAT(BENEFIT_GB,':',BENEFIT_NM) ORDER BY NUMB SEPARATOR ',')
-		          FROM   (
+		        SELECT GROUP_CONCAT(CONCAT(BENEFIT_GB,':',BENEFIT_NM) ORDER BY NUMB SEPARATOR ',')
+		        FROM   (
 		                SELECT GB.BENEFIT_GB
-		                , CASE WHEN GB.BENEFIT_GB = '10' THEN '쿠폰할인'
-		                       WHEN GB.BENEFIT_GB = '20' THEN '무료배송'
-		                       WHEN GB.BENEFIT_GB = '30' THEN '사은품'
-		                       WHEN GB.BENEFIT_GB = '40' THEN '신상'
-		                       ELSE '총알배송' END AS BENEFIT_NM
-		                , RANK() OVER(ORDER BY GB.BENEFIT_GB, GB.GOODS_CD) AS NUMB
+		                     , CASE WHEN GB.BENEFIT_GB = '10' THEN '쿠폰할인'
+		                            WHEN GB.BENEFIT_GB = '20' THEN '무료배송'
+		                            WHEN GB.BENEFIT_GB = '30' THEN '사은품'
+		                            WHEN GB.BENEFIT_GB = '40' THEN '신상'
+		                            ELSE '총알배송' END AS BENEFIT_NM
+		                     , RANK() OVER(ORDER BY GB.BENEFIT_GB, GB.GOODS_CD) AS NUMB
 		                FROM   TB_GOODS_BENEFIT GB
 		                WHERE  GB.GOODS_CD = G.GOODS_CD
-		          ) Z
-		     ) AS ICON
+		               ) Z
+		       ) AS BENEFITS
 		     , G.FORMAL_GB
 		     , G.REG_DT
 		     , G.NUMB
-		<choose>
-		    <when test="custNo != null and custNo > 0"> <!-- 로그인 했으면 -->
-		    , IF(W.GOODS_CD IS NULL,'','likeit')                                                           AS LIKE_IT       /*위시리스트담긴상품*/
-		    </when>
-		    <otherwise>
-		    , ''                                                                                           AS LIKE_IT       /*위시리스트담긴상품*/
-		    </otherwise>
-		</choose>
-		FROM TAB_ALL_GOODS G
+		     <choose>
+		         <when test="custNo != null and custNo > 0"> <!-- 로그인 했으면 -->
+		     , IF(W.GOODS_CD IS NULL,'','likeit')                                                           AS LIKE_IT       /*위시리스트담긴상품*/
+		        </when>
+		        <otherwise>
+		     , ''                                                                                           AS LIKE_IT       /*위시리스트담긴상품*/
+		        </otherwise>
+		     </choose>
+		FROM   TAB_ALL_GOODS G
 		LEFT OUTER JOIN TAB_GOODS_IMG GI ON G.GOODS_CD = GI.GOODS_CD
 		<if test="custNo != null and custNo > 0"> <!-- 로그인 했으면 -->
-			LEFT OUTER JOIN TB_WISHLIST W ON G.GOODS_CD = W.GOODS_CD
-			AND W.CUST_NO = #{custNo}
+		LEFT OUTER JOIN TB_WISHLIST W ON G.GOODS_CD = W.GOODS_CD
+		AND    W.CUST_NO = #{custNo}
 		</if>
 	</select>
 

+ 27 - 27
src/main/webapp/WEB-INF/views/web/display/CategoryGoodsListFormWeb.html

@@ -76,10 +76,10 @@
 								</ul>
 								<div class="form_field">
 									<div>
-										<input id="sexGb" type="checkbox" onclick="fnFilterOption(this,'on');"><label for="sexGb"> <span>남여 공용만 보기</span> </label>
+										<input id="unisex" type="checkbox" onclick="fnFilterOption(this,'on');"><label for="unisex"> <span>남여 공용만 보기</span> </label>
 									</div>
 									<div>
-										<input id="newProd" type="checkbox" onclick="fnFilterOption(this,'on');"><label for="newProd"> <span>신상품만 보기</span> </label>
+										<input id="newGoods" type="checkbox" onclick="fnFilterOption(this,'on');"><label for="newGoods"> <span>신상품만 보기</span> </label>
 									</div>
 								</div>
 							</div>
@@ -243,13 +243,13 @@
 									<div>
 										<ul id="sortArea">
 											<li>
-												<a href="javascript:void(0);" class="on" onclick="fnSortList(this,'new');">최신상품순</a>
+												<a href="javascript:void(0);" class="on" onclick="fnSortList(this,'NEW');">최신상품순</a>
 											</li>
 											<li>
-												<a href="javascript:void(0);" onclick="fnSortList(this,'best');">인기상품순</a>
+												<a href="javascript:void(0);" onclick="fnSortList(this,'BEST');">인기상품순</a>
 											</li>
 											<li>
-												<a href="javascript:void(0);" onclick="fnSortList(this,'review');">리뷰 많은순</a>
+												<a href="javascript:void(0);" onclick="fnSortList(this,'REVIEW');">리뷰 많은순</a>
 											</li>
 										</ul>
 									</div>
@@ -291,7 +291,7 @@
 		<input type="hidden" name="cate2No" th:value="${cateInfo.cate2No}"/>
 		<input type="hidden" name="cate3No" th:value="${cateInfo.cate3No}"/>
 		<input type="hidden" name="cate4No" th:value="${cateInfo.cate4No}"/>
-		<input type="hidden" name="sortGb" value="new"/>
+		<input type="hidden" name="sortingType" value="NEW"/>
 	</form>
 
 	<script src="/ux/plugins/gaga/gaga.infinite.scrollSession.js"></script>
@@ -378,23 +378,23 @@
 			var thisId = $(obj).attr('id');
 			var tag = '';
 
-			if(thisId == 'sexGb'){
+			if(thisId == 'unisex'){
 				if(stat=='on'){
 					$(obj).attr('onclick','fnFilterOption(this,\'off\');');
-					tag += '<input type="hidden" name="sexGb" value="G007_Z"/>\n';
+					tag += '<input type="hidden" name="unisex" value="G007_Z"/>\n';
 					$("#searchGoodsForm").append(tag);
 				}else{
 					$(obj).attr('onclick','fnFilterOption(this,\'on\');');
-					$("#searchGoodsForm input:hidden[name=sexGb]").remove();
+					$("#searchGoodsForm input:hidden[name=unisex]").remove();
 				}
 			}else{
 				if(stat=='on'){
 					$(obj).attr('onclick','fnFilterOption(this,\'off\');');
-					tag += '<input type="hidden" name="newProd" value="40"/>\n';
+					tag += '<input type="hidden" name="newGoods" value="40"/>\n';
 					$("#searchGoodsForm").append(tag);
 				}else{
 					$(obj).attr('onclick','fnFilterOption(this,\'on\');');
-					$("#searchGoodsForm input:hidden[name=newProd]").remove();
+					$("#searchGoodsForm input:hidden[name=newGoods]").remove();
 				}
 			}
 			fnCategoryGoodsInfiniteScrollInit();
@@ -453,9 +453,9 @@
 		}
 
 		var fnDrawInfiniteScrollData = function (result){
-			let totalCnt = result.totalCnt;
+			let totalCnt = result.paging.totalCount;
 			$("#totCntId").text(totalCnt.addComma());
-			gagaInfiniteScroll.pageStatus.totalCount = result.totalCnt;
+			gagaInfiniteScroll.pageStatus.totalCount = totalCnt;
 
 			var ithrCd = '';
 			var contentLoc = '';
@@ -463,8 +463,8 @@
 				$('.list_content .list_defult').hide();
 				$('.list_content .count_wrap').show();
 				var goodsUrl = [[${@environment.getProperty('upload.goods.view')}]];;
-				let lastPage = result.paging.pageable.pageNo;
-				let endRow = result.endRow - result.paging.pageable.pageSize;
+				let lastPage = result.paging.pageNo;
+				let endRow = result.paging.endRow - result.paging.pageSize;
 				var htm = fnCreateGoodsList(result, ithrCd, contentLoc, goodsUrl, lastPage, endRow);
 				gagaInfiniteScroll.draw(htm);
 				fnImgOnoff();
@@ -912,8 +912,8 @@
 				}else{
 					historyData = {};
 				}
-				if(typeof historyData.sortGbNm!='undefined' && historyData.sortGbNm!=''){
-					$(".arrayWrap .btn").text(historyData.sortGbNm);
+				if(typeof historyData.sortingTypeNm!='undefined' && historyData.sortingTypeNm!=''){
+					$(".arrayWrap .btn").text(historyData.sortingTypeNm);
 				}
 				if(typeof historyData.filterHtml!='undefined' && historyData.filterHtml!=''){
 					$("#searchForm").append(historyData.filterHtml);
@@ -926,20 +926,20 @@
 				if(typeof historyData.totalCount!='undefined' && historyData.totalCount!=''){
 					$("#totalGoodsCnt").text(historyData.totalCount);
 				}
-				if(typeof historyData.sortGb!='undefined' && historyData.sortGb!=''){
-					$("#sortSelect").val(historyData.sortGb);
-					$("#searchForm input:hidden[name=sortGb]").val(historyData.sortGb);
-					fnSortChange(historyData.sortGb);
+				if(typeof historyData.sortingType!='undefined' && historyData.sortingType!=''){
+					$("#sortSelect").val(historyData.sortingType);
+					$("#searchForm input:hidden[name=sortingType]").val(historyData.sortingType);
+					fnSortChange(historyData.sortingType);
 				}else{
 					fnGoodsListSearch();
 				}
 			}else{
 				fnCategoryGoodsInfiniteScrollInit();
-				/*var sortGb = [[${sortGb}]];
-				if(sortGb=='new' || sortGb=='best'){
-					$("#sortSelect").val(sortGb);
+				/*var sortingType = [[${sortingType}]];
+				if(sortingType=='NEW' || sortingType=='BEST'){
+					$("#sortSelect").val(sortingType);
 					$("#sortSelect").parent('div').children('span').text($("#sortSelect option:selected").text())
-					fnSortChange(sortGb);
+					fnSortChange(sortingType);
 				}else{
 					fnGoodsListSearch();
 				}*/
@@ -947,13 +947,13 @@
 			}
 		});
 
-		var fnSortList = function (obj, sortGb){
+		var fnSortList = function (obj, sortingType){
 			$("#sortArea").find('li').each(function (){
 				$(this).find('a').attr('class','off');
 			});
 
 			$(obj).addClass("on");
-			$("#searchGoodsForm").find("[name=sortGb]").val(sortGb);
+			$("#searchGoodsForm").find("[name=sortingType]").val(sortingType);
 			fnCategoryGoodsInfiniteScrollInit();
 			fnGoodsListSearch();
 		}