浏览代码

몰메인속도개선건

jmh 4 年之前
父节点
当前提交
33baf09fbd

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

@@ -378,6 +378,15 @@ public interface TsfGoodsDao {
 	 * @author gagamel
 	 * @date 2021. 3. 25
 	 */
+	Collection<Goods> getContentsCategoryGoodsList_old(Cate4Srch cate);
+	
+	/**
+	 * 컨텐츠카테고리상품 목록
+	 * @param cate - 카테고리 정보
+	 * @return
+	 * @author jmh
+	 * @date 2021. 8. 13
+	 */
 	Collection<Goods> getContentsCategoryGoodsList(Cate4Srch cate);
 
 	/**
@@ -535,13 +544,4 @@ public interface TsfGoodsDao {
 	 */
 	Collection<GoodsStock> getProductNoByGoodsColor(Goods goods);
 	
-
-	/**
-	 * 컨텐츠카테고리상품 목록
-	 * @param cate - 카테고리 정보
-	 * @return
-	 * @author gagamel
-	 * @date 2021. 3. 25
-	 */
-	Collection<Goods> getContentsCategoryGoodsList_TEST(Cate4Srch cate);
 }

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

@@ -553,6 +553,56 @@ public class TsfDisplayService {
 	 * @author bin2107
 	 * @date 2021. 3. 30
 	 */
+	public Collection<Contents> getContentsForGoods_old(Contents contents) {
+		Collection<Contents> contentsList = new ArrayList<>();
+		if(contents.getContentsLoc().equals("SMM007")){
+			contentsList = displayDao.getBrandpickTitleBrandList(contents);
+		}else{
+			contentsList = displayDao.getContentsList(contents);
+		}
+
+		Collection<Goods> goodsList = new ArrayList<>();
+		Cate4Srch tempContents = new Cate4Srch();
+		for (Contents data : contentsList) {
+			tempContents.setContentsLoc(data.getContentsLoc());
+			tempContents.setDispOrd(data.getDispOrd());
+			tempContents.setMaxRow(20);
+			tempContents.setCustNo(TsfSession.isLogin() ? TsfSession.getInfo().getCustNo() : 0);
+			if ("SMM007".equals(data.getContentsLoc())) {
+				if(!"".equals(data.getBrandGroupNo()) && !"null".equals(data.getBrandGroupNo()) && !data.getBrandGroupNo().equals(null)){
+					tempContents.setBrandGroupNo(Integer.parseInt(data.getBrandGroupNo()));
+				}
+				data.setFrontGb(TsfSession.getFrontGb());
+				data.setBannerList(displayDao.getContentsBannerList(data));
+			}
+			goodsList = (goodsDao.getContentsCategoryGoodsList_old(tempContents));
+			if ("SMM007".equals(data.getContentsLoc())) {
+				int maxrow = 3;
+				if (goodsList == null || goodsList.size() < 3) {
+					Cate4Srch cate = new Cate4Srch();
+					cate.setSiteCd(TscConstants.Site.STYLE24.value());
+					cate.setCateGb(TsfConstants.CateGb.BYITEM.value());
+					cate.setFrontGb(data.getFrontGb());
+					cate.setBrandGroupNo(Integer.parseInt(data.getBrandGroupNo()));
+					cate.setMaxRow(maxrow - goodsList.size());
+					goodsList.addAll(goodsDao.getContentsCategoryNewGoodsList(cate));
+				}
+			}
+			data.setGoodsList(goodsList);
+		}
+
+		log.info("getContentsForGoods contentsList.size()::{}", contentsList.size());
+
+		return contentsList;
+	}
+	
+	/**
+	 * 몰메인 MD PICK 목록
+	 * @param
+	 * @return
+	 * @author jmh
+	 * @date 2021. 8. 13
+	 */
 	public Collection<Contents> getContentsForGoods(Contents contents) {
 		Collection<Contents> contentsList = new ArrayList<>();
 		if(contents.getContentsLoc().equals("SMM007")){
@@ -603,6 +653,52 @@ public class TsfDisplayService {
 	 * @author bin2107
 	 * @date 2021. 4. 9
 	 */
+	public Collection<Contents> getBestItemForGoods_old(Contents contents) {
+		contents.setContentsLoc("SCM003");
+		contents.setCateNo(null);
+		Collection<Contents> contentsList = displayDao.getBestItemCategoryList(contents);
+		Cate4Srch tempCate = new Cate4Srch();
+
+		for (Contents data : contentsList) {
+			tempCate.setContentsLoc(data.getContentsLoc());
+			tempCate.setMaxRow(10);
+			tempCate.setCustNo(TsfSession.isLogin() ? TsfSession.getInfo().getCustNo() : 0);
+			tempCate.setCateNo(data.getCateNo());
+			tempCate.setSiteCd(data.getSiteCd());
+			tempCate.setCateGb(data.getCateGb());
+			Collection<Goods> cateGoodsList = goodsDao.getContentsCategoryGoodsList_old(tempCate);
+			if(10 > cateGoodsList.size()){
+				//TODO : 추천솔루션
+				int cnt = 0;
+				cnt = 10 - cateGoodsList.size();
+
+				Collection<Eigeneai.Result> itemList = eigeneaiApi.getCategoryWeeklySellBestGoodsList(cnt, data.getCateNo());
+				for(Eigeneai.Result tempData : itemList){
+					Goods tempBest = new Goods();
+					tempBest.setBrandGroupNm(tempData.getProduct().getBrandName());
+					tempBest.setGoodsCd(tempData.getProduct().getItemId());
+					tempBest.setGoodsFullNm(tempData.getProduct().getItemName());
+					tempBest.setListPrice((int) tempData.getProduct().getOriginalPrice());
+					tempBest.setCurrPrice((int) tempData.getProduct().getSalePrice());
+					tempBest.setSysImgNm(tempData.getProduct().getItemImage());
+					tempBest.setItemUrl(tempData.getProduct().getItemUrl());
+					cateGoodsList.add(tempBest);
+				}
+			}
+
+			data.setGoodsList(cateGoodsList);
+		}
+
+		return contentsList;
+	}
+	
+	/**
+	 * 몰메인 BESTITEM 목록
+	 * @param
+	 * @return
+	 * @author jmh
+	 * @date 2021. 8. 13
+	 */
 	public Collection<Contents> getBestItemForGoods(Contents contents) {
 		contents.setContentsLoc("SCM003");
 		contents.setCateNo(null);
@@ -983,101 +1079,5 @@ public class TsfDisplayService {
 	public Collection<Contents> getBrandpickTitleBrandList(Contents contents) {
 		return displayDao.getBrandpickTitleBrandList(contents);
 	}
-
 	
-	/**
-	 * 몰메인 BESTITEM 목록 - 테스트
-	 * @param
-	 * @return
-	 * @author jmh
-	 * @date 2021. 8. 4
-	 */
-	public Collection<Contents> getBestItemForGoods_TEST(Contents contents) {
-		contents.setContentsLoc("SCM003");
-		contents.setCateNo(null);
-		Collection<Contents> contentsList = displayDao.getBestItemCategoryList(contents);
-		Cate4Srch tempCate = new Cate4Srch();
-
-		for (Contents data : contentsList) {
-			tempCate.setContentsLoc(data.getContentsLoc());
-			tempCate.setMaxRow(10);
-			tempCate.setCustNo(TsfSession.isLogin() ? TsfSession.getInfo().getCustNo() : 0);
-			tempCate.setCateNo(data.getCateNo());
-			tempCate.setSiteCd(data.getSiteCd());
-			tempCate.setCateGb(data.getCateGb());
-			Collection<Goods> cateGoodsList = goodsDao.getContentsCategoryGoodsList_TEST(tempCate);
-			if(10 > cateGoodsList.size()){
-				//TODO : 추천솔루션
-				int cnt = 0;
-				cnt = 10 - cateGoodsList.size();
-
-				Collection<Eigeneai.Result> itemList = eigeneaiApi.getCategoryWeeklySellBestGoodsList(cnt, data.getCateNo());
-				for(Eigeneai.Result tempData : itemList){
-					Goods tempBest = new Goods();
-					tempBest.setBrandGroupNm(tempData.getProduct().getBrandName());
-					tempBest.setGoodsCd(tempData.getProduct().getItemId());
-					tempBest.setGoodsFullNm(tempData.getProduct().getItemName());
-					tempBest.setListPrice((int) tempData.getProduct().getOriginalPrice());
-					tempBest.setCurrPrice((int) tempData.getProduct().getSalePrice());
-					tempBest.setSysImgNm(tempData.getProduct().getItemImage());
-					tempBest.setItemUrl(tempData.getProduct().getItemUrl());
-					cateGoodsList.add(tempBest);
-				}
-			}
-
-			data.setGoodsList(cateGoodsList);
-		}
-
-		return contentsList;
-	}
-	
-	/**
-	 * 몰메인 MD PICK 목록 테스트
-	 * @param
-	 * @return
-	 * @author bin2107
-	 * @date 2021. 3. 30
-	 */
-	public Collection<Contents> getContentsForGoods_TEST(Contents contents) {
-		Collection<Contents> contentsList = new ArrayList<>();
-		if(contents.getContentsLoc().equals("SMM007")){
-			contentsList = displayDao.getBrandpickTitleBrandList(contents);
-		}else{
-			contentsList = displayDao.getContentsList(contents);
-		}
-
-		Collection<Goods> goodsList = new ArrayList<>();
-		Cate4Srch tempContents = new Cate4Srch();
-		for (Contents data : contentsList) {
-			tempContents.setContentsLoc(data.getContentsLoc());
-			tempContents.setDispOrd(data.getDispOrd());
-			tempContents.setMaxRow(20);
-			tempContents.setCustNo(TsfSession.isLogin() ? TsfSession.getInfo().getCustNo() : 0);
-			if ("SMM007".equals(data.getContentsLoc())) {
-				if(!"".equals(data.getBrandGroupNo()) && !"null".equals(data.getBrandGroupNo()) && !data.getBrandGroupNo().equals(null)){
-					tempContents.setBrandGroupNo(Integer.parseInt(data.getBrandGroupNo()));
-				}
-				data.setFrontGb(TsfSession.getFrontGb());
-				data.setBannerList(displayDao.getContentsBannerList(data));
-			}
-			goodsList = (goodsDao.getContentsCategoryGoodsList_TEST(tempContents));
-			if ("SMM007".equals(data.getContentsLoc())) {
-				int maxrow = 3;
-				if (goodsList == null || goodsList.size() < 3) {
-					Cate4Srch cate = new Cate4Srch();
-					cate.setSiteCd(TscConstants.Site.STYLE24.value());
-					cate.setCateGb(TsfConstants.CateGb.BYITEM.value());
-					cate.setFrontGb(data.getFrontGb());
-					cate.setBrandGroupNo(Integer.parseInt(data.getBrandGroupNo()));
-					cate.setMaxRow(maxrow - goodsList.size());
-					goodsList.addAll(goodsDao.getContentsCategoryNewGoodsList(cate));
-				}
-			}
-			data.setGoodsList(goodsList);
-		}
-
-		log.info("getContentsForGoods contentsList.size()::{}", contentsList.size());
-
-		return contentsList;
-	}
 }

+ 80 - 81
src/main/java/com/style24/front/biz/service/TsfGoodsService.java

@@ -1013,7 +1013,7 @@ public class TsfGoodsService {
 	 * @author gagamel
 	 * @since 2021. 3. 25
 	 */
-	public Collection<Goods> getContentsCategoryGoodsList(Cate4Srch cate) {
+	public Collection<Goods> getContentsCategoryGoodsList_old(Cate4Srch cate) {
 		cate.setSiteCd(TscConstants.Site.STYLE24.value());
 		cate.setFrontGb(TsfSession.getFrontGb());
 		cate.setCustGb(TsfSession.getCustGb());
@@ -1027,7 +1027,7 @@ public class TsfGoodsService {
 				maxRow = 3;
 			}
 
-			goodsList = goodsDao.getContentsCategoryGoodsList(cate);
+			goodsList = goodsDao.getContentsCategoryGoodsList_old(cate);
 
 			// 조회된 데이터가 없거나 건수가 20개 미만이면 신규상품(=정상상품) 조회
 			if (goodsList == null || goodsList.size() < maxRow) {
@@ -1058,7 +1058,7 @@ public class TsfGoodsService {
 			// TODO: 추천솔루션
 			int dispCnt = cate.getMaxRow();
 
-			goodsList = goodsDao.getContentsCategoryGoodsList(cate);
+			goodsList = goodsDao.getContentsCategoryGoodsList_old(cate);
 			// 수동설정 데이터 없거나 노출갯수보다 작으면 추천솔루션 데이터 표출
 			if(dispCnt > goodsList.size()){
 				int cnt = 0;
@@ -1127,91 +1127,20 @@ public class TsfGoodsService {
 				}
 			}
 		} else {
-			goodsList = goodsDao.getContentsCategoryGoodsList(cate);
+			goodsList = goodsDao.getContentsCategoryGoodsList_old(cate);
 		}
 
 		return goodsList;
 	}
-
-	/**
-	 * ep쿠폰 다운 처리
-	 *
-	 * @param coupon
-	 * @return int
-	 * @author eskim
-	 * @since 2021.04.15
-	 */
-	@Transactional("shopTxnManager")
-	public String createEpCoupon(Goods goods) {
-		return couponService.createEpCoupon(goods);
-	}
-
-	/**
-	 * 카테고리별 상품수
-	 * @param params - 검색엔진 정보
-	 * @return
-	 * @author bin2107
-	 * @date 2021. 4. 7
-	 */
-	public int getCategoryGoodsCount(SearchEngine params) {
-		return goodsDao.getCategoryGoodsCount(params);
-	}
-
-	/**
-	 * 카테고리별 상품 목록
-	 * @param params - 검색엔진 정보
-	 * @return
-	 * @author bin2107
-	 * @date 2021. 4. 8
-	 */
-	public Collection<SearchEngine> getCategoryGoodsList(SearchEngine params) {
-		return goodsDao.getCategoryGoodsList(params);
-	}
-
-	/**
-	 * 검색상품 총건수
-	 * @param params - 검색엔진 정보
-	 * @return
-	 * @author gagamel
-	 * @date 2021. 5. 6
-	 */
-	public int getSearchGoodsCount(SearchEngine params) {
-		return goodsDao.getSearchGoodsCount(params);
-	}
-
-	/**
-	 * 검색상품 목록
-	 * @param params - 검색엔진 정보
-	 * @return
-	 * @author gagamel
-	 * @date 2021. 5. 6
-	 */
-	public Collection<SearchEngine> getSearchGoodsList(SearchEngine params) {
-		return goodsDao.getSearchGoodsList(params);
-	}
-	
-	
-	/**
-	 * 상품 다른 색상의 productno 찾기
-	 * @param goods - 상품정보
-	 * @return
-	 * @author eskim
-	 * @date 2021. 7. 28
-	 */
-	public Collection<GoodsStock> getProductNoByGoodsColor(Goods goods) {
-		return goodsDao.getProductNoByGoodsColor(goods);
-	}
-
-	
 	
 	/**
 	 * 컨텐츠카테고리상품 목록
 	 * @param cate - 카테고리 정보
 	 * @return
-	 * @author gagamel
-	 * @since 2021. 3. 25
+	 * @author jmh
+	 * @since 2021. 8. 13
 	 */
-	public Collection<Goods> getContentsCategoryGoodsList_TEST(Cate4Srch cate) {
+	public Collection<Goods> getContentsCategoryGoodsList(Cate4Srch cate) {
 		cate.setSiteCd(TscConstants.Site.STYLE24.value());
 		cate.setFrontGb(TsfSession.getFrontGb());
 		cate.setCustGb(TsfSession.getCustGb());
@@ -1225,7 +1154,7 @@ public class TsfGoodsService {
 				maxRow = 3;
 			}
 
-			goodsList = goodsDao.getContentsCategoryGoodsList_TEST(cate);
+			goodsList = goodsDao.getContentsCategoryGoodsList(cate);
 
 			// 조회된 데이터가 없거나 건수가 20개 미만이면 신규상품(=정상상품) 조회
 			if (goodsList == null || goodsList.size() < maxRow) {
@@ -1256,7 +1185,7 @@ public class TsfGoodsService {
 			// TODO: 추천솔루션
 			int dispCnt = cate.getMaxRow();
 
-			goodsList = goodsDao.getContentsCategoryGoodsList_TEST(cate);
+			goodsList = goodsDao.getContentsCategoryGoodsList(cate);
 			// 수동설정 데이터 없거나 노출갯수보다 작으면 추천솔루션 데이터 표출
 			if(dispCnt > goodsList.size()){
 				int cnt = 0;
@@ -1325,9 +1254,79 @@ public class TsfGoodsService {
 				}
 			}
 		} else {
-			goodsList = goodsDao.getContentsCategoryGoodsList_TEST(cate);
+			goodsList = goodsDao.getContentsCategoryGoodsList(cate);
 		}
 
 		return goodsList;
 	}
+
+	/**
+	 * ep쿠폰 다운 처리
+	 *
+	 * @param coupon
+	 * @return int
+	 * @author eskim
+	 * @since 2021.04.15
+	 */
+	@Transactional("shopTxnManager")
+	public String createEpCoupon(Goods goods) {
+		return couponService.createEpCoupon(goods);
+	}
+
+	/**
+	 * 카테고리별 상품수
+	 * @param params - 검색엔진 정보
+	 * @return
+	 * @author bin2107
+	 * @date 2021. 4. 7
+	 */
+	public int getCategoryGoodsCount(SearchEngine params) {
+		return goodsDao.getCategoryGoodsCount(params);
+	}
+
+	/**
+	 * 카테고리별 상품 목록
+	 * @param params - 검색엔진 정보
+	 * @return
+	 * @author bin2107
+	 * @date 2021. 4. 8
+	 */
+	public Collection<SearchEngine> getCategoryGoodsList(SearchEngine params) {
+		return goodsDao.getCategoryGoodsList(params);
+	}
+
+	/**
+	 * 검색상품 총건수
+	 * @param params - 검색엔진 정보
+	 * @return
+	 * @author gagamel
+	 * @date 2021. 5. 6
+	 */
+	public int getSearchGoodsCount(SearchEngine params) {
+		return goodsDao.getSearchGoodsCount(params);
+	}
+
+	/**
+	 * 검색상품 목록
+	 * @param params - 검색엔진 정보
+	 * @return
+	 * @author gagamel
+	 * @date 2021. 5. 6
+	 */
+	public Collection<SearchEngine> getSearchGoodsList(SearchEngine params) {
+		return goodsDao.getSearchGoodsList(params);
+	}
+	
+	
+	/**
+	 * 상품 다른 색상의 productno 찾기
+	 * @param goods - 상품정보
+	 * @return
+	 * @author eskim
+	 * @date 2021. 7. 28
+	 */
+	public Collection<GoodsStock> getProductNoByGoodsColor(Goods goods) {
+		return goodsDao.getProductNoByGoodsColor(goods);
+	}
+
 }

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

@@ -335,7 +335,7 @@ public class TsfDisplayController extends TsfBaseController {
 					cate4Srch.setMaxRow(20);
 				}
 
-				Collection<Goods> goodsList = goodsService.getContentsCategoryGoodsList_TEST(cate4Srch);
+				Collection<Goods> goodsList = goodsService.getContentsCategoryGoodsList_old(cate4Srch);
 				mainLayout.setGoodsList(goodsList);
 
 				if ("A".equals(mainLayout.getContentsYn())) {
@@ -345,7 +345,7 @@ public class TsfDisplayController extends TsfBaseController {
 
 			if (contentsLoc.equals("SMM004")) {
 				contents.setPageGb("MALL");
-				mainLayout.setBestItemList(displayService.getBestItemForGoods_TEST(contents));
+				mainLayout.setBestItemList(displayService.getBestItemForGoods_old(contents));
 			}
 
 			if (contentsLoc.equals("SMM006")) {
@@ -357,19 +357,19 @@ public class TsfDisplayController extends TsfBaseController {
 			}
 
 			if (contentsLoc.equals("SMM007")) {
-				mainLayout.setBrandPickList(displayService.getContentsForGoods_TEST(contents));
+				mainLayout.setBrandPickList(displayService.getContentsForGoods_old(contents));
 			}
 
 			if (contentsLoc.equals("SMM009") || contentsLoc.equals("SMM012")) {
 				if (contentsLoc.equals("SMM009")) {
 					contents.setMaxRow(5);
 				}
-				mainLayout.setMdPickList(displayService.getContentsForGoods_TEST(contents));
+				mainLayout.setMdPickList(displayService.getContentsForGoods_old(contents));
 			}
 
 			if (contentsLoc.equals("SMM003") || contentsLoc.equals("SBM007")) {
 				if (Integer.parseInt(mainLayout.getContentsCnt()) > 0) {
-					mainLayout.setNewItemList(displayService.getContentsForGoods_TEST(contents));
+					mainLayout.setNewItemList(displayService.getContentsForGoods_old(contents));
 				} else {
 					mainLayout.setNewItemList(displayService.getMainNewGoodsList(contents));
 				}

+ 208 - 442
src/main/java/com/style24/persistence/mybatis/shop/TsfGoods.xml

@@ -1428,8 +1428,8 @@
 	</select>
 	
 	<!-- 컨텐츠카테고리상품 목록 -->
-	<select id="getContentsCategoryGoodsList"  parameterType="Cate4Srch" resultType="Goods">
-		/* TsfGoods.getContentsCategoryGoodsList */
+	<select id="getContentsCategoryGoodsList_old"  parameterType="Cate4Srch" resultType="Goods">
+		/* TsfGoods.getContentsCategoryGoodsList_old */
 		WITH TAB_GOODS AS (
 		    SELECT
 		           <if test="contentsLoc == 'SMM003' or contentsLoc == 'SBM007' or contentsLoc == 'SBM008' or contentsLoc == 'SBM009' or contentsLoc == 'SBM017' or contentsLoc == 'SBM018' or contentsLoc == 'SBM019' or contentsLoc == 'SOM003' or contentsLoc == 'SOM002'">
@@ -1691,6 +1691,212 @@
 		                             AND W.CUST_NO = #{custNo}
 		</if>
 	</select>
+	
+	<!-- 컨텐츠카테고리상품 목록 -->
+	<select id="getContentsCategoryGoodsList"  parameterType="Cate4Srch" resultType="Goods">
+	/* TsfGoods.getContentsCategoryGoodsList */
+		SELECT
+	           <if test="contentsLoc == 'SMM003' or contentsLoc == 'SBM007' or contentsLoc == 'SBM008' or contentsLoc == 'SBM009' or contentsLoc == 'SBM017' or contentsLoc == 'SBM018' or contentsLoc == 'SBM019' or contentsLoc == 'SOM003' or contentsLoc == 'SOM002'">
+				   DISTINCT
+			   </if>
+	           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         /*정상가(최초판매가)*/
+	         , FN_GET_BENEFIT_PRICE(#{frontGb},G.GOODS_CD,G.CURR_PRICE,#{custGb}) AS CURR_PRICE         /*현재판매가*/
+	         , G.REG_DT             /*등록일시*/
+	         , G.DISP_ORD
+	         , G.SYS_IMG_NM
+	         , G.SYS_IMG_NM2
+	         , G.VIDEOS
+	         <if test="contentsLoc == 'SCM003' and pageGb != null and pageGb == 'BEST'">
+	         , G.SELL_WEEK_QTY
+	         </if>
+	         <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   (
+	            SELECT
+	                   <if test="contentsLoc == 'SCM003' and pageGb != null and pageGb == 'BEST'">
+	                      DISTINCT
+	                   </if>
+	                   TT.BRAND_GROUP_NM 									     /*브랜드그룹명*/
+	                 , TT.GOODS_CD                                               /*상품코드*/
+	                 , TT.GOODS_NM                                               /*상품명*/
+	                 , TT.GOODS_GB                                               /*상품구분*/
+	                 , TT.SELF_GOODS_YN      /*자사상품여부*/
+	                 , TT.FOREIGN_BUY_YN                                         /*해외구매대행여부*/
+	                 , TT.PARALLEL_IMPORT_YN                                     /*병행수입여부*/
+	                 , TT.ORDER_MADE_YN                                          /*주문제작여부*/
+	                 , TT.GOODS_TNM                                              /*상품타이틀명*/
+	                 , TT.MAIN_COLOR_CD                                          /*대표색상코드*/
+	                 , TT.LIST_PRICE                                             /*정상가(최초판매가)*/
+	                 , TT.CURR_PRICE                                             /*현재판매가*/
+	                 , TT.REG_DT                                                 /*등록일시*/
+	                 , TT.UPD_DT
+	                 , TT.SYS_IMG_NM
+			         , TT.SYS_IMG_NM2
+			         , TT.VIDEOS
+	            <choose>
+	                <when test="contentsLoc == 'SMM009' or contentsLoc == 'SMM007' or contentsLoc == 'SMM012'">
+	                 , CT.DISP_ORD
+	                </when>
+	                <when test="contentsLoc == 'SMM003' or contentsLoc == 'SBM007' or contentsLoc == 'SBM008' or contentsLoc == 'SBM009' or contentsLoc == 'SBM017' or contentsLoc == 'SBM018' or contentsLoc == 'SBM019' or contentsLoc == 'SOM003' or contentsLoc == 'SCM002' or contentsLoc == 'SCM003' or contentsLoc == 'SOM002'">
+	                , CTG.DISP_ORD
+	                </when>
+	                 <otherwise>
+	                 , CG.DISP_ORD
+	                 </otherwise>
+	            </choose>
+	            <if test="contentsLoc == 'SCM003' and pageGb != null and pageGb == 'BEST'">
+	                 , GS.SELL_WEEK_QTY
+	                 , CT.CATE_NO AS CATE1_NO
+	            </if>
+	            <choose>
+	                <when test="contentsLoc == 'SMM009' or contentsLoc == 'SMM007' or contentsLoc == 'SMM012' or contentsLoc == 'SMM003' or contentsLoc == 'SBM007' or contentsLoc == 'SBM008' or contentsLoc == 'SBM009' or contentsLoc == 'SBM017' or contentsLoc == 'SBM018' or contentsLoc == 'SBM019' or contentsLoc == 'SOM003' or contentsLoc == 'SCM002' or contentsLoc == 'SCM003' or contentsLoc == 'SOM002'"> <!-- md추천 -->
+	                    FROM	TB_CONTENTS CT
+	                    , TB_CONTENTS_GOODS CTG
+	                    , TB_CONTENTS_GOODS_MAIN TT
+	                    
+	                    <if test="contentsLoc == 'SCM003' and pageGb != null and pageGb == 'BEST'">
+	                    , TB_GOODS_SUMMARY GS
+	                    </if>
+	                    WHERE	1=1
+	                    AND     CT.CONTENTS_LOC = CTG.CONTENTS_LOC
+	                    AND 	CT.DISP_ORD = CTG.CONTENTS_SQ
+	                    <if test="contentsLoc == 'SCM003' or contentsLoc == 'SCM002'">
+	                    AND    CT.CATE_NO = CTG.CATE_NO
+	                    </if>
+	                    <if test="contentsLoc == 'SCM003' and pageGb != null and pageGb == 'BEST'"> <!-- 베스트 -->
+	                    AND    CTG.GOODS_CD = GS.GOODS_CD
+	                    </if>
+	                    AND		CTG.GOODS_CD = TT.GOODS_CD
+	                   -- AND		CTG.GOODS_CD = S.GOODS_CD
+	                   -- AND		G.BRAND_CD = B.BRAND_CD
+	                   -- AND     B.BRAND_GROUP_NO = BG.BRAND_GROUP_NO
+	                    AND		CT.CONTENTS_LOC = #{contentsLoc}
+	                    <if test="contentsLoc == 'SMM009' or contentsLoc == 'SMM012'">
+	                    AND 	CTG.CONTENTS_SQ = #{dispOrd}
+	                    </if>
+	                    <if test="contentsLoc == 'SMM007'">
+	                    AND		CT.BRAND_GROUP_NO = #{brandGroupNo}
+	                    </if>
+	                    <if test="contentsLoc == 'SMM003' or contentsLoc == 'SBM007' or contentsLoc == 'SBM008' or contentsLoc == 'SBM009' or contentsLoc == 'SBM017' or contentsLoc == 'SBM018' or contentsLoc == 'SBM019' or contentsLoc == 'SOM003' or contentsLoc == 'SCM002' or contentsLoc == 'SCM003' or contentsLoc == 'SOM002'">
+	                        <if test="brandGroupNo != null and brandGroupNo != ''">
+	                        AND		CTG.BRAND_GROUP_NO = #{brandGroupNo}
+	                        </if>
+	                      AND CT.CONTENTS_SQ IN ( SELECT TMP.CONTENTS_SQ FROM (SELECT A.CONTENTS_SQ FROM TB_CONTENTS A WHERE 1=1 AND A.CONTENTS_LOC = #{contentsLoc} AND NOW() BETWEEN A.DISP_STDT AND A.DISP_EDDT
+	                                                                                    <if test="brandGroupNo != null and brandGroupNo != ''">
+	                                                                                        AND A.BRAND_GROUP_NO = #{brandGroupNo}
+	                                                                                    </if>
+	                                                                                    <if test="contentsLoc=='SCM003'">
+	                                                                                        <if test="cateNo != null and cateNo != ''">
+	                                                                                        AND A.CATE_NO = #{cateNo}
+	                                                                                        </if>
+	                                                                                    </if>
+	                                                                                    <if test="contentsLoc=='SCM002'">
+	                                                                                        <if test="cate1No != null and cate1No != ''">
+	                                                                                            AND A.CATE_NO = #{cate1No}
+	                                                                                        </if>
+	                                                                                    </if>
+	                                                                                    <if test="pageGb != null and pageGb == 'BEST'">
+	                                                                                        <if test="cate1No != null and cate1No != ''">
+	                                                                                        AND A.CATE_NO = #{cate1No}
+	                                                                                        </if>
+	                                                                                    </if>
+	                                                                                    AND A.USE_YN = 'Y' ORDER BY A.DISP_ORD
+	                                                                                    LIMIT 1
+	                                                                          ) AS TMP
+	                                                              )
+	                    </if>
+	                    AND		NOW() BETWEEN CT.DISP_STDT AND CT.DISP_EDDT
+	                </when>
+	                <otherwise>
+	                    FROM   TB_CATE_4SRCH C4
+	                    , TB_CATE_GOODS CG
+	                    , TB_CONTENTS_GOODS_MAIN TT
+	                    
+	                    <if test="contentsLoc == 'SCM003'"> <!-- 베스트 -->
+	                    , TB_GOODS_SUMMARY GS
+	                    </if>
+	                    WHERE  C4.LEAF_CATE_NO = CG.CATE_NO
+	                    <choose>
+	                        <when test="brandGroupNo != null and brandGroupNo != ''">
+	                    AND    CG.BRAND_GROUP_NO = #{brandGroupNo}
+	                        </when>
+	                        <otherwise>
+	                    AND    CG.BRAND_GROUP_NO = 0 /*브랜드메인에서 접근한 것이 아니면*/
+	                        </otherwise>
+	                    </choose>
+	                    AND    CG.GOODS_CD = TT.GOODS_CD
+	                    
+	                    <if test="contentsLoc == 'SCM003'"> <!-- 베스트 -->
+	                    AND    CG.GOODS_CD = GS.GOODS_CD
+                        </if>
+                        AND    C4.SITE_CD = #{siteCd}
+                        AND    C4.CATE_GB = #{cateGb}
+                        AND    C4.CATE_TYPE = 'G031_20' /*컨텐츠카테고리*/
+	                    <choose>
+	                        <when test="pageGb != null and pageGb == 'BEST'">
+	                            <if test="cate1No != null and cate1No != ''">
+	                            AND    C4.CATE1_NO = #{cate1No}
+	                            </if>
+	                        </when>
+	                        <otherwise>
+	                        AND    C4.CATE1_NO = #{cate1No}
+	                        </otherwise>
+	                    </choose>
+	                    AND    C4.CONTENTS_LOC = #{contentsLoc}
+	              </otherwise>
+	           </choose>
+	           
+	            <if test="pageGb != null and pageGb == 'BEST'">
+	            ORDER BY CT.CATE_NO
+	            LIMIT 100
+	            </if>
+	           ) G
+	           <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>
+				   
+		    WHERE  1=1
+		<choose>
+		    <when test="contentsLoc == 'SCM013'"><!-- 베스트 -->
+		     ORDER BY G.SELL_WEEK_QTY DESC , G.GOODS_CD
+		    </when>
+		    <when test="contentsLoc == 'SMM009' or contentsLoc == 'SMM007' or contentsLoc == 'SMM012'"> <!-- md추천 -->
+		    </when>
+		    <when test="contentsLoc == 'SCM002' or (contentsLoc == 'SCM003' and pageGb == null)"> <!-- md추천 -->
+		     ORDER BY G.DISP_ORD ,G.UPD_DT DESC, G.CURR_PRICE DESC, G.GOODS_CD ASC
+		    </when>
+		    <when test="contentsLoc == 'SCM003' and pageGb != null and pageGb == 'BEST'">
+		     ORDER BY G.CATE1_NO, G.DISP_ORD ,G.UPD_DT DESC, G.CURR_PRICE DESC, G.GOODS_CD ASC
+		    </when>
+		    <otherwise>
+		     ORDER BY G.DISP_ORD , G.REG_DT DESC , G.GOODS_CD
+		    </otherwise>
+		</choose>
+		<if test="pageable != null and pageable.endRow != null and pageable.endRow > 0">
+			LIMIT #{pageable.limitStartRow} , #{pageable.pageSize}
+		</if>
+		<if test="maxRow != null and maxRow !=''">
+		    LIMIT #{maxRow}
+		</if>
+		
+	</select>
 
 	<!-- 컨텐츠카테고리상품 건수 -->
 	<select id="getContentsCategoryGoodsCount"  parameterType="Cate4Srch" resultType="int">
@@ -3784,445 +3990,5 @@
 		AND   OPT_CD1 <![CDATA[<>]]>  #{colorCd}
 		AND   PRODUCT_NO IS NOT NULL
 	</select>
-	
-	
-	<!-- 컨텐츠카테고리상품 목록 (JMH 이선미매니저 테스트 요청)  -->
-	<select id="getContentsCategoryGoodsList_TEST_old"  parameterType="Cate4Srch" resultType="Goods">
-	/* TsfGoods.getContentsCategoryGoodsList_TEST_old */
-		WITH TAB_GOODS AS (
-		    SELECT
-		           <if test="contentsLoc == 'SMM003' or contentsLoc == 'SBM007' or contentsLoc == 'SBM008' or contentsLoc == 'SBM009' or contentsLoc == 'SBM017' or contentsLoc == 'SBM018' or contentsLoc == 'SBM019' or contentsLoc == 'SOM003' or contentsLoc == 'SOM002'">
-					   DISTINCT
-				   </if>
-		           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.REG_DT             /*등록일시*/
-		         , G.DISP_ORD
-		         <if test="contentsLoc == 'SCM003' and pageGb != null and pageGb == 'BEST'">
-		         , G.SELL_WEEK_QTY
-		         </if>
-		    FROM   (
-		            SELECT
-		                   <if test="contentsLoc == 'SCM003' and pageGb != null and pageGb == 'BEST'">
-		                      DISTINCT
-		                   </if>
-		                   TT.BRAND_GROUP_NM 									     /*브랜드그룹명*/
-		                 , TT.GOODS_CD                                               /*상품코드*/
-		                 , TT.GOODS_NM                                               /*상품명*/
-		                 , TT.GOODS_GB                                               /*상품구분*/
-		                 , TT.SELF_GOODS_YN      /*자사상품여부*/
-		                 , TT.FOREIGN_BUY_YN                                         /*해외구매대행여부*/
-		                 , TT.PARALLEL_IMPORT_YN                                     /*병행수입여부*/
-		                 , TT.ORDER_MADE_YN                                          /*주문제작여부*/
-		                 , TT.GOODS_TNM                                              /*상품타이틀명*/
-		                 , TT.MAIN_COLOR_CD                                          /*대표색상코드*/
-		                 , TT.LIST_PRICE                                             /*정상가(최초판매가)*/
-		                 , TT.CURR_PRICE                                             /*현재판매가*/
-		                 , TT.REG_DT                                                 /*등록일시*/
-		                 , TT.UPD_DT
-		            <choose>
-		                <when test="contentsLoc == 'SMM009' or contentsLoc == 'SMM007' or contentsLoc == 'SMM012'">
-		                 , CT.DISP_ORD
-		                </when>
-		                <when test="contentsLoc == 'SMM003' or contentsLoc == 'SBM007' or contentsLoc == 'SBM008' or contentsLoc == 'SBM009' or contentsLoc == 'SBM017' or contentsLoc == 'SBM018' or contentsLoc == 'SBM019' or contentsLoc == 'SOM003' or contentsLoc == 'SCM002' or contentsLoc == 'SCM003' or contentsLoc == 'SOM002'">
-		                , CTG.DISP_ORD
-		                </when>
-		                 <otherwise>
-		                 , CG.DISP_ORD
-		                 </otherwise>
-		            </choose>
-		            <if test="contentsLoc == 'SCM003' and pageGb != null and pageGb == 'BEST'">
-		                 , GS.SELL_WEEK_QTY
-		                 , CT.CATE_NO AS CATE1_NO
-		            </if>
-		            <choose>
-		                <when test="contentsLoc == 'SMM009' or contentsLoc == 'SMM007' or contentsLoc == 'SMM012' or contentsLoc == 'SMM003' or contentsLoc == 'SBM007' or contentsLoc == 'SBM008' or contentsLoc == 'SBM009' or contentsLoc == 'SBM017' or contentsLoc == 'SBM018' or contentsLoc == 'SBM019' or contentsLoc == 'SOM003' or contentsLoc == 'SCM002' or contentsLoc == 'SCM003' or contentsLoc == 'SOM002'"> <!-- md추천 -->
-		                    FROM	TB_CONTENTS CT
-		                    , TB_CONTENTS_GOODS CTG
-		                    , TB_CONTENTS_GOODS_MAIN TT
-		                    , TB_GOODS_STOCK S
-		                    
-		                    <if test="contentsLoc == 'SCM003' and pageGb != null and pageGb == 'BEST'">
-		                    , TB_GOODS_SUMMARY GS
-		                    </if>
-		                    WHERE	1=1
-		                    AND     CT.CONTENTS_LOC = CTG.CONTENTS_LOC
-		                    AND 	CT.DISP_ORD = CTG.CONTENTS_SQ
-		                    <if test="contentsLoc == 'SCM003' or contentsLoc == 'SCM002'">
-		                    AND    CT.CATE_NO = CTG.CATE_NO
-		                    </if>
-		                    <if test="contentsLoc == 'SCM003' and pageGb != null and pageGb == 'BEST'"> <!-- 베스트 -->
-		                    AND    CTG.GOODS_CD = GS.GOODS_CD
-		                    </if>
-		                    AND		CTG.GOODS_CD = TT.GOODS_CD
-		                    AND		CTG.GOODS_CD = S.GOODS_CD
-		                   -- AND		G.BRAND_CD = B.BRAND_CD
-		                   -- AND     B.BRAND_GROUP_NO = BG.BRAND_GROUP_NO
-		                    AND		CT.CONTENTS_LOC = #{contentsLoc}
-		                    <if test="contentsLoc == 'SMM009' or contentsLoc == 'SMM012'">
-		                    AND 	CTG.CONTENTS_SQ = #{dispOrd}
-		                    </if>
-		                    <if test="contentsLoc == 'SMM007'">
-		                    AND		CT.BRAND_GROUP_NO = #{brandGroupNo}
-		                    </if>
-		                    <if test="contentsLoc == 'SMM003' or contentsLoc == 'SBM007' or contentsLoc == 'SBM008' or contentsLoc == 'SBM009' or contentsLoc == 'SBM017' or contentsLoc == 'SBM018' or contentsLoc == 'SBM019' or contentsLoc == 'SOM003' or contentsLoc == 'SCM002' or contentsLoc == 'SCM003' or contentsLoc == 'SOM002'">
-		                        <if test="brandGroupNo != null and brandGroupNo != ''">
-		                        AND		CTG.BRAND_GROUP_NO = #{brandGroupNo}
-		                        </if>
-		                      AND CT.CONTENTS_SQ IN ( SELECT TMP.CONTENTS_SQ FROM (SELECT A.CONTENTS_SQ FROM TB_CONTENTS A WHERE 1=1 AND A.CONTENTS_LOC = #{contentsLoc} AND NOW() BETWEEN A.DISP_STDT AND A.DISP_EDDT
-		                                                                                    <if test="brandGroupNo != null and brandGroupNo != ''">
-		                                                                                        AND A.BRAND_GROUP_NO = #{brandGroupNo}
-		                                                                                    </if>
-		                                                                                    <if test="contentsLoc=='SCM003'">
-		                                                                                        <if test="cateNo != null and cateNo != ''">
-		                                                                                        AND A.CATE_NO = #{cateNo}
-		                                                                                        </if>
-		                                                                                    </if>
-		                                                                                    <if test="contentsLoc=='SCM002'">
-		                                                                                        <if test="cate1No != null and cate1No != ''">
-		                                                                                            AND A.CATE_NO = #{cate1No}
-		                                                                                        </if>
-		                                                                                    </if>
-		                                                                                    <if test="pageGb != null and pageGb == 'BEST'">
-		                                                                                        <if test="cate1No != null and cate1No != ''">
-		                                                                                        AND A.CATE_NO = #{cate1No}
-		                                                                                        </if>
-		                                                                                    </if>
-		                                                                                    AND A.USE_YN = 'Y' ORDER BY A.DISP_ORD
-		                                                                                    LIMIT 1
-		                                                                          ) AS TMP
-		                                                              )
-		                    </if>
-		                    AND		NOW() BETWEEN CT.DISP_STDT AND CT.DISP_EDDT
-		                </when>
-		                <otherwise>
-		                    FROM   TB_CATE_4SRCH C4
-		                    , TB_CATE_GOODS CG
-		                    , TB_CONTENTS_GOODS_MAIN TT
-		                    , TB_GOODS_STOCK S
-		                    
-		                    <if test="contentsLoc == 'SCM003'"> <!-- 베스트 -->
-		                    , TB_GOODS_SUMMARY GS
-		                    </if>
-		                    WHERE  C4.LEAF_CATE_NO = CG.CATE_NO
-		                    <choose>
-		                        <when test="brandGroupNo != null and brandGroupNo != ''">
-		                    AND    CG.BRAND_GROUP_NO = #{brandGroupNo}
-		                        </when>
-		                        <otherwise>
-		                    AND    CG.BRAND_GROUP_NO = 0 /*브랜드메인에서 접근한 것이 아니면*/
-		                        </otherwise>
-		                    </choose>
-		                    AND    CG.GOODS_CD = TT.GOODS_CD
-		                    AND    CG.GOODS_CD = S.GOODS_CD
-		                    
-		                    <if test="contentsLoc == 'SCM003'"> <!-- 베스트 -->
-		                    AND    CG.GOODS_CD = GS.GOODS_CD
-	                        </if>
-	                        AND    C4.SITE_CD = #{siteCd}
-	                        AND    C4.CATE_GB = #{cateGb}
-	                        AND    C4.CATE_TYPE = 'G031_20' /*컨텐츠카테고리*/
-		                    <choose>
-		                        <when test="pageGb != null and pageGb == 'BEST'">
-		                            <if test="cate1No != null and cate1No != ''">
-		                            AND    C4.CATE1_NO = #{cate1No}
-		                            </if>
-		                        </when>
-		                        <otherwise>
-		                        AND    C4.CATE1_NO = #{cate1No}
-		                        </otherwise>
-		                    </choose>
-		                    AND    C4.CONTENTS_LOC = #{contentsLoc}
-		              </otherwise>
-		           </choose>
-		           -- 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 <![CDATA[>]]> 0 /*재고있는상품*/
-		           -- AND    B.USE_YN = 'Y'
-		           -- AND    BG.USE_YN = 'Y'
-		            <if test="pageGb != null and pageGb == 'BEST'">
-		            ORDER BY CT.CATE_NO
-		            LIMIT 100
-		            </if>
-		           ) G
-		    WHERE  1=1
-		<choose>
-		    <when test="contentsLoc == 'SCM013'"><!-- 베스트 -->
-		     ORDER BY G.SELL_WEEK_QTY DESC , G.GOODS_CD
-		    </when>
-		    <when test="contentsLoc == 'SMM009' or contentsLoc == 'SMM007' or contentsLoc == 'SMM012'"> <!-- md추천 -->
-		    </when>
-		    <when test="contentsLoc == 'SCM002' or (contentsLoc == 'SCM003' and pageGb == null)"> <!-- md추천 -->
-		     ORDER BY G.DISP_ORD ,G.UPD_DT DESC, G.CURR_PRICE DESC, G.GOODS_CD ASC
-		    </when>
-		    <when test="contentsLoc == 'SCM003' and pageGb != null and pageGb == 'BEST'">
-		     ORDER BY G.CATE1_NO, G.DISP_ORD ,G.UPD_DT DESC, G.CURR_PRICE DESC, G.GOODS_CD ASC
-		    </when>
-		    <otherwise>
-		     ORDER BY G.DISP_ORD , G.REG_DT DESC , G.GOODS_CD
-		    </otherwise>
-		</choose>
-		<if test="pageable != null and pageable.endRow != null and pageable.endRow > 0">
-			LIMIT #{pageable.limitStartRow} , #{pageable.pageSize}
-		</if>
-		<if test="maxRow != null and maxRow !=''">
-		    LIMIT #{maxRow}
-		</if>
-		)
-		SELECT G.BRAND_GROUP_NM
-		     , G.GOODS_CD
-		     , FN_GET_GOODS_NM(G.GOODS_NM,G.GOODS_GB,G.FOREIGN_BUY_YN,G.PARALLEL_IMPORT_YN,G.ORDER_MADE_YN) AS GOODS_FULL_NM /*상품FULL명*/
-		     , G.GOODS_TNM
-		     , G.MAIN_COLOR_CD
-		     , G.LIST_PRICE
-		     , FN_GET_BENEFIT_PRICE(#{frontGb},G.GOODS_CD,G.CURR_PRICE,#{custGb})                           AS CURR_PRICE    /*현재판매가*/
-		     , (SELECT SYS_IMG_NM FROM TB_GOODS_IMG X WHERE X.GOODS_CD = G.GOODS_CD AND IF(G.SELF_GOODS_YN= 'N', 'XX', G.MAIN_COLOR_CD) = X.COLOR_CD AND DEFAULT_IMG_YN = 'Y' LIMIT 1) AS SYS_IMG_NM
-		     , (SELECT SYS_IMG_NM FROM TB_GOODS_IMG X WHERE X.GOODS_CD = G.GOODS_CD AND IF(G.SELF_GOODS_YN= 'N', 'XX', G.MAIN_COLOR_CD) = X.COLOR_CD AND MOUSEOVER_IMG_YN = 'Y' LIMIT 1) AS 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 VIDEOS
-		   
-		     <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_GOODS G
-		<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>
-	</select>
-
-	<!-- 컨텐츠카테고리상품 목록 (JMH 이선미매니저 테스트 요청)  -->
-	<select id="getContentsCategoryGoodsList_TEST"  parameterType="Cate4Srch" resultType="Goods">
-	/* TsfGoods.getContentsCategoryGoodsList_TEST2 */
-		SELECT
-	           <if test="contentsLoc == 'SMM003' or contentsLoc == 'SBM007' or contentsLoc == 'SBM008' or contentsLoc == 'SBM009' or contentsLoc == 'SBM017' or contentsLoc == 'SBM018' or contentsLoc == 'SBM019' or contentsLoc == 'SOM003' or contentsLoc == 'SOM002'">
-				   DISTINCT
-			   </if>
-	           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         /*정상가(최초판매가)*/
-	         , FN_GET_BENEFIT_PRICE(#{frontGb},G.GOODS_CD,G.CURR_PRICE,#{custGb}) AS CURR_PRICE         /*현재판매가*/
-	         , G.REG_DT             /*등록일시*/
-	         , G.DISP_ORD
-	         , G.SYS_IMG_NM
-	         , G.SYS_IMG_NM2
-	         , G.VIDEOS
-	         <if test="contentsLoc == 'SCM003' and pageGb != null and pageGb == 'BEST'">
-	         , G.SELL_WEEK_QTY
-	         </if>
-	         <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   (
-	            SELECT
-	                   <if test="contentsLoc == 'SCM003' and pageGb != null and pageGb == 'BEST'">
-	                      DISTINCT
-	                   </if>
-	                   TT.BRAND_GROUP_NM 									     /*브랜드그룹명*/
-	                 , TT.GOODS_CD                                               /*상품코드*/
-	                 , TT.GOODS_NM                                               /*상품명*/
-	                 , TT.GOODS_GB                                               /*상품구분*/
-	                 , TT.SELF_GOODS_YN      /*자사상품여부*/
-	                 , TT.FOREIGN_BUY_YN                                         /*해외구매대행여부*/
-	                 , TT.PARALLEL_IMPORT_YN                                     /*병행수입여부*/
-	                 , TT.ORDER_MADE_YN                                          /*주문제작여부*/
-	                 , TT.GOODS_TNM                                              /*상품타이틀명*/
-	                 , TT.MAIN_COLOR_CD                                          /*대표색상코드*/
-	                 , TT.LIST_PRICE                                             /*정상가(최초판매가)*/
-	                 , TT.CURR_PRICE                                             /*현재판매가*/
-	                 , TT.REG_DT                                                 /*등록일시*/
-	                 , TT.UPD_DT
-	                 , TT.SYS_IMG_NM
-			         , TT.SYS_IMG_NM2
-			         , TT.VIDEOS
-	            <choose>
-	                <when test="contentsLoc == 'SMM009' or contentsLoc == 'SMM007' or contentsLoc == 'SMM012'">
-	                 , CT.DISP_ORD
-	                </when>
-	                <when test="contentsLoc == 'SMM003' or contentsLoc == 'SBM007' or contentsLoc == 'SBM008' or contentsLoc == 'SBM009' or contentsLoc == 'SBM017' or contentsLoc == 'SBM018' or contentsLoc == 'SBM019' or contentsLoc == 'SOM003' or contentsLoc == 'SCM002' or contentsLoc == 'SCM003' or contentsLoc == 'SOM002'">
-	                , CTG.DISP_ORD
-	                </when>
-	                 <otherwise>
-	                 , CG.DISP_ORD
-	                 </otherwise>
-	            </choose>
-	            <if test="contentsLoc == 'SCM003' and pageGb != null and pageGb == 'BEST'">
-	                 , GS.SELL_WEEK_QTY
-	                 , CT.CATE_NO AS CATE1_NO
-	            </if>
-	            <choose>
-	                <when test="contentsLoc == 'SMM009' or contentsLoc == 'SMM007' or contentsLoc == 'SMM012' or contentsLoc == 'SMM003' or contentsLoc == 'SBM007' or contentsLoc == 'SBM008' or contentsLoc == 'SBM009' or contentsLoc == 'SBM017' or contentsLoc == 'SBM018' or contentsLoc == 'SBM019' or contentsLoc == 'SOM003' or contentsLoc == 'SCM002' or contentsLoc == 'SCM003' or contentsLoc == 'SOM002'"> <!-- md추천 -->
-	                    FROM	TB_CONTENTS CT
-	                    , TB_CONTENTS_GOODS CTG
-	                    , TB_CONTENTS_GOODS_MAIN TT
-	                    
-	                    <if test="contentsLoc == 'SCM003' and pageGb != null and pageGb == 'BEST'">
-	                    , TB_GOODS_SUMMARY GS
-	                    </if>
-	                    WHERE	1=1
-	                    AND     CT.CONTENTS_LOC = CTG.CONTENTS_LOC
-	                    AND 	CT.DISP_ORD = CTG.CONTENTS_SQ
-	                    <if test="contentsLoc == 'SCM003' or contentsLoc == 'SCM002'">
-	                    AND    CT.CATE_NO = CTG.CATE_NO
-	                    </if>
-	                    <if test="contentsLoc == 'SCM003' and pageGb != null and pageGb == 'BEST'"> <!-- 베스트 -->
-	                    AND    CTG.GOODS_CD = GS.GOODS_CD
-	                    </if>
-	                    AND		CTG.GOODS_CD = TT.GOODS_CD
-	                   -- AND		CTG.GOODS_CD = S.GOODS_CD
-	                   -- AND		G.BRAND_CD = B.BRAND_CD
-	                   -- AND     B.BRAND_GROUP_NO = BG.BRAND_GROUP_NO
-	                    AND		CT.CONTENTS_LOC = #{contentsLoc}
-	                    <if test="contentsLoc == 'SMM009' or contentsLoc == 'SMM012'">
-	                    AND 	CTG.CONTENTS_SQ = #{dispOrd}
-	                    </if>
-	                    <if test="contentsLoc == 'SMM007'">
-	                    AND		CT.BRAND_GROUP_NO = #{brandGroupNo}
-	                    </if>
-	                    <if test="contentsLoc == 'SMM003' or contentsLoc == 'SBM007' or contentsLoc == 'SBM008' or contentsLoc == 'SBM009' or contentsLoc == 'SBM017' or contentsLoc == 'SBM018' or contentsLoc == 'SBM019' or contentsLoc == 'SOM003' or contentsLoc == 'SCM002' or contentsLoc == 'SCM003' or contentsLoc == 'SOM002'">
-	                        <if test="brandGroupNo != null and brandGroupNo != ''">
-	                        AND		CTG.BRAND_GROUP_NO = #{brandGroupNo}
-	                        </if>
-	                      AND CT.CONTENTS_SQ IN ( SELECT TMP.CONTENTS_SQ FROM (SELECT A.CONTENTS_SQ FROM TB_CONTENTS A WHERE 1=1 AND A.CONTENTS_LOC = #{contentsLoc} AND NOW() BETWEEN A.DISP_STDT AND A.DISP_EDDT
-	                                                                                    <if test="brandGroupNo != null and brandGroupNo != ''">
-	                                                                                        AND A.BRAND_GROUP_NO = #{brandGroupNo}
-	                                                                                    </if>
-	                                                                                    <if test="contentsLoc=='SCM003'">
-	                                                                                        <if test="cateNo != null and cateNo != ''">
-	                                                                                        AND A.CATE_NO = #{cateNo}
-	                                                                                        </if>
-	                                                                                    </if>
-	                                                                                    <if test="contentsLoc=='SCM002'">
-	                                                                                        <if test="cate1No != null and cate1No != ''">
-	                                                                                            AND A.CATE_NO = #{cate1No}
-	                                                                                        </if>
-	                                                                                    </if>
-	                                                                                    <if test="pageGb != null and pageGb == 'BEST'">
-	                                                                                        <if test="cate1No != null and cate1No != ''">
-	                                                                                        AND A.CATE_NO = #{cate1No}
-	                                                                                        </if>
-	                                                                                    </if>
-	                                                                                    AND A.USE_YN = 'Y' ORDER BY A.DISP_ORD
-	                                                                                    LIMIT 1
-	                                                                          ) AS TMP
-	                                                              )
-	                    </if>
-	                    AND		NOW() BETWEEN CT.DISP_STDT AND CT.DISP_EDDT
-	                </when>
-	                <otherwise>
-	                    FROM   TB_CATE_4SRCH C4
-	                    , TB_CATE_GOODS CG
-	                    , TB_CONTENTS_GOODS_MAIN TT
-	                    
-	                    <if test="contentsLoc == 'SCM003'"> <!-- 베스트 -->
-	                    , TB_GOODS_SUMMARY GS
-	                    </if>
-	                    WHERE  C4.LEAF_CATE_NO = CG.CATE_NO
-	                    <choose>
-	                        <when test="brandGroupNo != null and brandGroupNo != ''">
-	                    AND    CG.BRAND_GROUP_NO = #{brandGroupNo}
-	                        </when>
-	                        <otherwise>
-	                    AND    CG.BRAND_GROUP_NO = 0 /*브랜드메인에서 접근한 것이 아니면*/
-	                        </otherwise>
-	                    </choose>
-	                    AND    CG.GOODS_CD = TT.GOODS_CD
-	                    
-	                    <if test="contentsLoc == 'SCM003'"> <!-- 베스트 -->
-	                    AND    CG.GOODS_CD = GS.GOODS_CD
-                        </if>
-                        AND    C4.SITE_CD = #{siteCd}
-                        AND    C4.CATE_GB = #{cateGb}
-                        AND    C4.CATE_TYPE = 'G031_20' /*컨텐츠카테고리*/
-	                    <choose>
-	                        <when test="pageGb != null and pageGb == 'BEST'">
-	                            <if test="cate1No != null and cate1No != ''">
-	                            AND    C4.CATE1_NO = #{cate1No}
-	                            </if>
-	                        </when>
-	                        <otherwise>
-	                        AND    C4.CATE1_NO = #{cate1No}
-	                        </otherwise>
-	                    </choose>
-	                    AND    C4.CONTENTS_LOC = #{contentsLoc}
-	              </otherwise>
-	           </choose>
-	           
-	            <if test="pageGb != null and pageGb == 'BEST'">
-	            ORDER BY CT.CATE_NO
-	            LIMIT 100
-	            </if>
-	           ) G
-	           <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>
-				   
-		    WHERE  1=1
-		<choose>
-		    <when test="contentsLoc == 'SCM013'"><!-- 베스트 -->
-		     ORDER BY G.SELL_WEEK_QTY DESC , G.GOODS_CD
-		    </when>
-		    <when test="contentsLoc == 'SMM009' or contentsLoc == 'SMM007' or contentsLoc == 'SMM012'"> <!-- md추천 -->
-		    </when>
-		    <when test="contentsLoc == 'SCM002' or (contentsLoc == 'SCM003' and pageGb == null)"> <!-- md추천 -->
-		     ORDER BY G.DISP_ORD ,G.UPD_DT DESC, G.CURR_PRICE DESC, G.GOODS_CD ASC
-		    </when>
-		    <when test="contentsLoc == 'SCM003' and pageGb != null and pageGb == 'BEST'">
-		     ORDER BY G.CATE1_NO, G.DISP_ORD ,G.UPD_DT DESC, G.CURR_PRICE DESC, G.GOODS_CD ASC
-		    </when>
-		    <otherwise>
-		     ORDER BY G.DISP_ORD , G.REG_DT DESC , G.GOODS_CD
-		    </otherwise>
-		</choose>
-		<if test="pageable != null and pageable.endRow != null and pageable.endRow > 0">
-			LIMIT #{pageable.limitStartRow} , #{pageable.pageSize}
-		</if>
-		<if test="maxRow != null and maxRow !=''">
-		    LIMIT #{maxRow}
-		</if>
-		
-	</select>
 		
 </mapper>