bin2107 5 éve
szülő
commit
03fd32cefd

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

@@ -1412,9 +1412,9 @@
 		         , G.CURR_PRICE         /*현재판매가*/
 		         , G.REG_DT             /*등록일시*/
 		         , G.DISP_ORD
-				<if test="contentsLoc == 'SCM002'">
-					, G.SELL_WEEK_QTY
-				</if>
+		         <if test="contentsLoc == 'SCM002'">
+		         , G.SELL_WEEK_QTY
+		         </if>
 		    FROM   (
 		            SELECT CASE WHEN BG.DISP_NM_LANG = 'EN' THEN
 		                            BG.BRAND_GROUP_ENM
@@ -1434,19 +1434,19 @@
 		                 , G.CURR_PRICE                                             /*현재판매가*/
 		                 , G.REG_DT                                                 /*등록일시*/
 		                 , G.UPD_DT
-					<choose>
-						<when test="contentsLoc == 'SMM009' or contentsLoc == 'SMM007' or contentsLoc == 'SMM012'">
-						 , CT.DISP_ORD
+		            <choose>
+		                <when test="contentsLoc == 'SMM009' or contentsLoc == 'SMM007' or contentsLoc == 'SMM012'">
+		                 , CT.DISP_ORD
 		                 </when>
 		                 <otherwise>
-						 , CG.DISP_ORD
-						 </otherwise>
-					</choose>
+		                 , CG.DISP_ORD
+		                 </otherwise>
+		            </choose>
 		            <if test="contentsLoc == 'SCM002'">
-						, GS.SELL_WEEK_QTY
-					</if>
-					<if test="contentsLoc == 'SCM003' and pageGb != null and pageGb == 'BEST'">
-		            	, C4.CATE1_NO
+		                , GS.SELL_WEEK_QTY
+		            </if>
+		            <if test="contentsLoc == 'SCM003' and pageGb != null and pageGb == 'BEST'">
+		                , C4.CATE1_NO
 		            </if>
 		            <choose>
 		                <when test="contentsLoc == 'SMM009' or contentsLoc == 'SMM007' or contentsLoc == 'SMM012'"> <!-- md추천 -->
@@ -1469,7 +1469,7 @@
 		                <otherwise>
 		                    FROM   TB_CATE_4SRCH C4
 		                    , TB_CATE_GOODS CG
-		                    , TB_GOODS G USE INDEX (IX_GOODS_11)
+		                    , TB_GOODS G 
 		                    , TB_GOODS_STOCK S
 		                    , TB_BRAND B
 		                    , TB_BRAND_GROUP BG
@@ -1516,25 +1516,26 @@
 		            AND    BG.USE_YN = 'Y'
 		            <if test="pageGb != null and pageGb == 'BEST'">
 		            ORDER BY C4.CATE1_NO
+		            LIMIT 100
 		            </if>
 		           ) G
 		    WHERE  1=1
 		<choose>
-			<when test="contentsLoc == 'SCM113'"> <!-- 베스트 -->
-				ORDER BY G.SELL_WEEK_QTY DESC , G.GOODS_CD
-			</when>
-			<when test="contentsLoc == 'SMM009' or contentsLoc == 'SMM007' or contentsLoc == 'SMM012'"> <!-- md추천 -->
-				ORDER BY G.DISP_ORD , G.REG_DT DESC , G.GOODS_CD
-			</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>
+		    <when test="contentsLoc == 'SCM113'"> <!-- 베스트 -->
+		     ORDER BY G.SELL_WEEK_QTY DESC , G.GOODS_CD
+		    </when>
+		    <when test="contentsLoc == 'SMM009' or contentsLoc == 'SMM007' or contentsLoc == 'SMM012'"> <!-- md추천 -->
+		     ORDER BY G.DISP_ORD , G.REG_DT DESC , G.GOODS_CD
+		    </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">
 		    <choose>
@@ -1542,12 +1543,12 @@
 		    LIMIT 100
 		        </when>
 		        <otherwise>
-		    LIMIT #{pageable.startRow} , #{pageable.endRow}
+		    LIMIT #{pageable.limitStartRow} , #{pageable.pageSize}
 		        </otherwise>
 		    </choose>
 		</if>
 		<if test="maxRow != null and maxRow !=''">
-			LIMIT #{maxRow}
+		    LIMIT #{maxRow}
 		</if>
 		)
 		SELECT G.BRAND_GROUP_NM