Parcourir la source

몰메인 쿼리분리

jmh il y a 4 ans
Parent
commit
82930404c9

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

@@ -372,13 +372,13 @@ public interface TsfGoodsDao {
 	Collection<Freegift> getFreeGoodsList(Goods goods);
 
 	/**
-	 * 컨텐츠카테고리상품 목록
+	 * 컨텐츠카테고리상품 목록(메인용)
 	 * @param cate - 카테고리 정보
 	 * @return
 	 * @author gagamel
 	 * @date 2021. 3. 25
 	 */
-	Collection<Goods> getContentsCategoryGoodsList_old(Cate4Srch cate);
+	Collection<Goods> getContentsCategoryGoodsListMain(Cate4Srch cate);
 	
 	/**
 	 * 컨텐츠카테고리상품 목록

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

@@ -547,13 +547,13 @@ public class TsfDisplayService {
 	}
 
 	/**
-	 * 몰메인 MD PICK 목록
+	 * 몰메인 MD PICK 목록(메인용)
 	 * @param
 	 * @return
 	 * @author bin2107
 	 * @date 2021. 3. 30
 	 */
-	public Collection<Contents> getContentsForGoods_old(Contents contents) {
+	public Collection<Contents> getContentsForGoodsMain(Contents contents) {
 		Collection<Contents> contentsList = new ArrayList<>();
 		if(contents.getContentsLoc().equals("SMM007")){
 			contentsList = displayDao.getBrandpickTitleBrandList(contents);
@@ -575,7 +575,7 @@ public class TsfDisplayService {
 				data.setFrontGb(TsfSession.getFrontGb());
 				data.setBannerList(displayDao.getContentsBannerList(data));
 			}
-			goodsList = (goodsDao.getContentsCategoryGoodsList_old(tempContents));
+			goodsList = (goodsDao.getContentsCategoryGoodsListMain(tempContents));
 			if ("SMM007".equals(data.getContentsLoc())) {
 				int maxrow = 3;
 				if (goodsList == null || goodsList.size() < 3) {
@@ -647,13 +647,13 @@ public class TsfDisplayService {
 	}
 
 	/**
-	 * 몰메인 BESTITEM 목록
+	 * 몰메인 BESTITEM 목록(메인용)
 	 * @param
 	 * @return
 	 * @author bin2107
 	 * @date 2021. 4. 9
 	 */
-	public Collection<Contents> getBestItemForGoods_old(Contents contents) {
+	public Collection<Contents> getBestItemForGoodsMain(Contents contents) {
 		contents.setContentsLoc("SCM003");
 		contents.setCateNo(null);
 		Collection<Contents> contentsList = displayDao.getBestItemCategoryList(contents);
@@ -666,7 +666,7 @@ public class TsfDisplayService {
 			tempCate.setCateNo(data.getCateNo());
 			tempCate.setSiteCd(data.getSiteCd());
 			tempCate.setCateGb(data.getCateGb());
-			Collection<Goods> cateGoodsList = goodsDao.getContentsCategoryGoodsList_old(tempCate);
+			Collection<Goods> cateGoodsList = goodsDao.getContentsCategoryGoodsListMain(tempCate);
 			if(10 > cateGoodsList.size()){
 				//TODO : 추천솔루션
 				int cnt = 0;

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

@@ -1007,13 +1007,13 @@ public class TsfGoodsService {
 	}
 
 	/**
-	 * 컨텐츠카테고리상품 목록
+	 * 컨텐츠카테고리상품 목록(메인용)
 	 * @param cate - 카테고리 정보
 	 * @return
 	 * @author gagamel
 	 * @since 2021. 3. 25
 	 */
-	public Collection<Goods> getContentsCategoryGoodsList_old(Cate4Srch cate) {
+	public Collection<Goods> getContentsCategoryGoodsListMain(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_old(cate);
+			goodsList = goodsDao.getContentsCategoryGoodsListMain(cate);
 
 			// 조회된 데이터가 없거나 건수가 20개 미만이면 신규상품(=정상상품) 조회
 			if (goodsList == null || goodsList.size() < maxRow) {
@@ -1058,7 +1058,7 @@ public class TsfGoodsService {
 			// TODO: 추천솔루션
 			int dispCnt = cate.getMaxRow();
 
-			goodsList = goodsDao.getContentsCategoryGoodsList_old(cate);
+			goodsList = goodsDao.getContentsCategoryGoodsListMain(cate);
 			// 수동설정 데이터 없거나 노출갯수보다 작으면 추천솔루션 데이터 표출
 			if(dispCnt > goodsList.size()){
 				int cnt = 0;
@@ -1127,7 +1127,7 @@ public class TsfGoodsService {
 				}
 			}
 		} else {
-			goodsList = goodsDao.getContentsCategoryGoodsList_old(cate);
+			goodsList = goodsDao.getContentsCategoryGoodsListMain(cate);
 		}
 
 		return goodsList;

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

@@ -197,7 +197,7 @@ public class TsfDisplayController extends TsfBaseController {
 					cate4Srch.setMaxRow(20);
 				}
 
-				Collection<Goods> goodsList = goodsService.getContentsCategoryGoodsList(cate4Srch);
+				Collection<Goods> goodsList = goodsService.getContentsCategoryGoodsListMain(cate4Srch);
 				mainLayout.setGoodsList(goodsList);
 
 				if ("A".equals(mainLayout.getContentsYn())) {
@@ -207,7 +207,7 @@ public class TsfDisplayController extends TsfBaseController {
 
 			if (contentsLoc.equals("SMM004")) {
 				contents.setPageGb("MALL");
-				mainLayout.setBestItemList(displayService.getBestItemForGoods(contents));
+				mainLayout.setBestItemList(displayService.getBestItemForGoodsMain(contents));
 			}
 
 			if (contentsLoc.equals("SMM006")) {
@@ -219,19 +219,19 @@ public class TsfDisplayController extends TsfBaseController {
 			}
 
 			if (contentsLoc.equals("SMM007")) {
-				mainLayout.setBrandPickList(displayService.getContentsForGoods(contents));
+				mainLayout.setBrandPickList(displayService.getContentsForGoodsMain(contents));
 			}
 
 			if (contentsLoc.equals("SMM009") || contentsLoc.equals("SMM012")) {
 				if (contentsLoc.equals("SMM009")) {
 					contents.setMaxRow(5);
 				}
-				mainLayout.setMdPickList(displayService.getContentsForGoods(contents));
+				mainLayout.setMdPickList(displayService.getContentsForGoodsMain(contents));
 			}
 
 			if (contentsLoc.equals("SMM003") || contentsLoc.equals("SBM007")) {
 				if (Integer.parseInt(mainLayout.getContentsCnt()) > 0) {
-					mainLayout.setNewItemList(displayService.getContentsForGoods(contents));
+					mainLayout.setNewItemList(displayService.getContentsForGoodsMain(contents));
 				} else {
 					mainLayout.setNewItemList(displayService.getMainNewGoodsList(contents));
 				}
@@ -335,7 +335,7 @@ public class TsfDisplayController extends TsfBaseController {
 					cate4Srch.setMaxRow(20);
 				}
 
-				Collection<Goods> goodsList = goodsService.getContentsCategoryGoodsList_old(cate4Srch);
+				Collection<Goods> goodsList = goodsService.getContentsCategoryGoodsList(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_old(contents));
+				mainLayout.setBestItemList(displayService.getBestItemForGoods(contents));
 			}
 
 			if (contentsLoc.equals("SMM006")) {
@@ -357,19 +357,19 @@ public class TsfDisplayController extends TsfBaseController {
 			}
 
 			if (contentsLoc.equals("SMM007")) {
-				mainLayout.setBrandPickList(displayService.getContentsForGoods_old(contents));
+				mainLayout.setBrandPickList(displayService.getContentsForGoods(contents));
 			}
 
 			if (contentsLoc.equals("SMM009") || contentsLoc.equals("SMM012")) {
 				if (contentsLoc.equals("SMM009")) {
 					contents.setMaxRow(5);
 				}
-				mainLayout.setMdPickList(displayService.getContentsForGoods_old(contents));
+				mainLayout.setMdPickList(displayService.getContentsForGoods(contents));
 			}
 
 			if (contentsLoc.equals("SMM003") || contentsLoc.equals("SBM007")) {
 				if (Integer.parseInt(mainLayout.getContentsCnt()) > 0) {
-					mainLayout.setNewItemList(displayService.getContentsForGoods_old(contents));
+					mainLayout.setNewItemList(displayService.getContentsForGoods(contents));
 				} else {
 					mainLayout.setNewItemList(displayService.getMainNewGoodsList(contents));
 				}

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

@@ -1442,8 +1442,8 @@
 	</select>
 	
 	<!-- 컨텐츠카테고리상품 목록 -->
-	<select id="getContentsCategoryGoodsList_old"  parameterType="Cate4Srch" resultType="Goods">
-		/* TsfGoods.getContentsCategoryGoodsList_old */
+	<select id="getContentsCategoryGoodsList"  parameterType="Cate4Srch" resultType="Goods">
+		/* TsfGoods.getContentsCategoryGoodsList */
 		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'">
@@ -1706,9 +1706,9 @@
 		</if>
 	</select>
 	
-	<!-- 컨텐츠카테고리상품 목록 -->
-	<select id="getContentsCategoryGoodsList"  parameterType="Cate4Srch" resultType="Goods">
-	/* TsfGoods.getContentsCategoryGoodsList */
+	<!-- 컨텐츠카테고리상품 목록(메인용) -->
+	<select id="getContentsCategoryGoodsListMain"  parameterType="Cate4Srch" resultType="Goods">
+	/* TsfGoods.getContentsCategoryGoodsListMain */
 		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