ソースを参照

Merge remote-tracking branch 'origin/jsh77b' into xodud1202

xodud lee 5 年 前
コミット
5c7aa9826b

+ 10 - 6
src/main/java/com/style24/persistence/mybatis/shop/TscOrder.xml

@@ -46,6 +46,8 @@
 		) OCD
 		    ON OD.ORD_DTL_NO = OCD.ORD_DTL_NO
 		</if>
+		  LEFT OUTER JOIN TB_CUSTOMER CU
+		    ON O.CUST_NO = CU.CUST_NO
 	 	 WHERE 1=1
 	 	   AND OD.ORD_DTL_STAT <![CDATA[<>]]> 'G013_00'
 		<if test='siteCd != null and siteCd != ""'>
@@ -105,7 +107,7 @@
 		   AND O.ORD_NM = #{orderNm}
 		</if>
 		<if test='custId != null and custId != ""'>
-		   AND O.CUST_NO = #{custId}
+		   AND CU.CUST_ID = #{custId}
 		</if>
 		<if test='orderPhnno != null and orderPhnno != ""'>
 		   AND O.ORD_PHNNO = #{orderPhnno}
@@ -122,8 +124,8 @@
 		<if test='orderNm != null and orderNm != ""'>
 		   AND O.ORD_NM = #{orderNm}
 		</if>
-		<if test='custId != null and custId != ""'>
-		   AND O.CUST_NO = #{custId}
+		<if test='custNo != null and custNo != ""'>
+		   AND O.CUST_NO = #{custNo}
 		</if>
 		<if test='orderPhnno != null and orderPhnno != ""'>
 		   AND O.ORD_PHNNO = #{orderPhnno}
@@ -308,6 +310,8 @@
 											  ) OCD
 			                    ON OD.ORD_DTL_NO = OCD.ORD_DTL_NO
 			</if>
+		                      LEFT OUTER JOIN TB_CUSTOMER CU
+		                        ON O.CUST_NO = CU.CUST_NO
 			                 WHERE 1=1
 			                   AND OD.ORD_DTL_STAT <![CDATA[<>]]> 'G013_00'
 			<if test='siteCd != null and siteCd != ""'>
@@ -364,7 +368,7 @@
 			                   AND O.ORD_NM = #{orderNm}
 			</if>
 			<if test='custId != null and custId != ""'>
-			                   AND O.CUST_NO = #{custId}
+			                   AND CU.CUST_ID = #{custId}
 			</if>
 			<if test='orderPhnno != null and orderPhnno != ""'>
 			                   AND O.ORD_PHNNO = #{orderPhnno}
@@ -387,8 +391,8 @@
 			<if test='orderNm != null and orderNm != ""'>
 			                   AND O.ORD_NM = #{orderNm}
 			</if>
-			<if test='custId != null and custId != ""'>
-			                   AND O.CUST_NO = #{custId}
+			<if test='custNo != null and custNo != ""'>
+			                   AND O.CUST_NO = #{custNo}
 			</if>
 			<if test='orderPhnno != null and orderPhnno != ""'>
 			                   AND O.ORD_PHNNO = #{orderPhnno}

+ 4 - 2
src/main/java/com/style24/persistence/mybatis/shop/TscOrderChange.xml

@@ -2234,7 +2234,8 @@
 		 INNER JOIN (SELECT ORD_NO
 		                  , CART_CPN_SQ
 		               FROM TB_ORDER_DETAIL
-		              GROUP BY ORD_NO) OD
+		              GROUP BY ORD_NO
+		                  , CART_CPN_SQ) OD
 		    ON CC.CUST_CPN_SQ = OD.CART_CPN_SQ
 		   SET CC.USED_DT = NULL
 		     , CC.UPD_NO = #{updNo}
@@ -2250,7 +2251,8 @@
 		                  , DELV_CPN_SQ
 		               FROM TB_DELIVERY_FEE
 		              WHERE DELV_FEE_GB = 'G018_10'
-		              GROUP BY ORD_NO) DF
+		              GROUP BY ORD_NO
+		                  , DELV_CPN_SQ) DF
 		    ON CC.CUST_CPN_SQ = DF.DELV_CPN_SQ
 		   SET CC.USED_DT = NULL
 		     , CC.UPD_NO = #{updNo}