Kaynağa Gözat

Merge remote-tracking branch 'origin/ST24PRJ-7(제휴몰검색기능)' into develop

card007 4 yıl önce
ebeveyn
işleme
bfef14ea78

+ 22 - 2
src/main/java/com/style24/persistence/mybatis/shop/TscOrder.xml

@@ -146,8 +146,18 @@
 		           #{item}
 			</foreach>
 		</if>
-		    ORDER BY OD.ORD_NO DESC
-		        , OD.ORD_DTL_NO DESC
+		<if test="optCd != null and optCd != ''">
+		       AND ODI.OPT_CD LIKE CONCAT('%',#{optCd},'%')
+		</if>
+		<if test="extmallId != null and extmallId != ''">
+		       AND OD.VENDOR_ID = #{vendorId}
+		       AND OD.EXTMALL_ID = #{extmallId}
+		</if>
+		<if test="extmallOrderId != null and extmallOrderId != ''">
+		       AND OD.EXTMALL_ORDER_ID LIKE CONCAT('%',#{extmallOrderId},'%')
+		</if>
+		     ORDER BY OD.ORD_NO DESC
+		         , OD.ORD_DTL_NO DESC
 		),
 		CTE_PAYMENT AS (
 		    SELECT A.*
@@ -356,6 +366,16 @@
 			<foreach collection="ordNoList" item="item" index="index"  open="(" close=")" separator=",">
 		           #{item}
 			</foreach>
+		</if>
+		<if test="optCd != null and optCd != ''">
+		       AND ODI.OPT_CD LIKE CONCAT('%',#{optCd},'%')
+		</if>
+		<if test="extmallId != null and extmallId != ''">
+		       AND OD.VENDOR_ID = #{vendorId}
+		       AND OD.EXTMALL_ID = #{extmallId}
+		</if>
+		<if test="extmallOrderId != null and extmallOrderId != ''">
+		       AND OD.EXTMALL_ORDER_ID LIKE CONCAT('%',#{extmallOrderId},'%')
 		</if>
 		    GROUP BY OD.ORD_NO, OD.GOODS_CD, OD.ORD_DTL_NO, OD.DELV_ADDR_SQ, O.CUST_NO
 		    ORDER BY OD.ORD_NO DESC