Procházet zdrojové kódy

상품목록 - 스타일년도 관련 쿼리 수정

eskim před 5 roky
rodič
revize
2d7cef0cfa

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

@@ -625,17 +625,13 @@
 		            </foreach>
 		        </if>
 		        <if test="styleYear != null and styleYear != ''">
-		        AND G.STYLE_YEAR = (SELECT CD_NM FROM TB_COMMON_CODE WHERE CD = #{styleYear} AND CD_GB='G023')
+		        AND G.STYLE_YEAR = #{styleYear}
 		        </if>
 		        <if test="multiStyleYear != null and multiStyleYear != ''">
-		        AND G.STYLE_YEAR IN (SELECT CD_NM 
-		                             FROM TB_COMMON_CODE 
-		                             WHERE CD_GB='G023' 
-		                             AND CD IN 
-		                             <foreach collection="multiStyleYear" item="item" index="index"  open="(" close=")" separator=",">
-		                             #{item}
-		                             </foreach>
-		                             )
+		        AND G.STYLE_YEAR IN 
+		             <foreach collection="multiStyleYear" item="item" index="index"  open="(" close=")" separator=",">
+		             #{item}
+		             </foreach>
 		        </if>
 		        <if test="seasonCd != null and seasonCd != ''">
 		        AND G.SEASON_CD = #{seasonCd}

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

@@ -97,17 +97,13 @@
 		            </foreach>
 		        </if>
 		        <if test="styleYear != null and styleYear != ''">
-		        AND G.STYLE_YEAR = (SELECT CD_NM FROM TB_COMMON_CODE WHERE CD = #{styleYear} AND CD_GB='G023')
+		        AND G.STYLE_YEAR = #{styleYear}
 		        </if>
 		        <if test="multiStyleYear != null and multiStyleYear != ''">
-		        AND G.STYLE_YEAR IN (SELECT CD_NM 
-		                             FROM TB_COMMON_CODE 
-		                             WHERE CD_GB='G023' 
-		                             AND CD IN 
-		                             <foreach collection="multiStyleYear" item="item" index="index"  open="(" close=")" separator=",">
-		                             #{item}
-		                             </foreach>
-		                             )
+		        AND G.STYLE_YEAR IN  
+		            <foreach collection="multiStyleYear" item="item" index="index"  open="(" close=")" separator=",">
+		            #{item}
+		            </foreach>
 		        </if>
 		        <if test="seasonCd != null and seasonCd != ''">
 		        AND G.SEASON_CD = #{seasonCd}