ソースを参照

샵링커수정

jmh 4 年 前
コミット
2d342fd2d1

+ 1 - 1
src/main/java/com/style24/core/biz/dao/TscShoplinkerDao.java

@@ -287,6 +287,6 @@ public interface TscShoplinkerDao {
 	 * @author jmh
 	 * @since 2021. 5. 20
 	 */
-	Collection<ShoplinkerGoods> getStockListList(ShoplinkerSearch shoplinkerSearch);
+	Collection<ShoplinkerGoods> getStockList(ShoplinkerSearch shoplinkerSearch);
 
 }

+ 2 - 2
src/main/java/com/style24/core/biz/service/TscShoplinkerService.java

@@ -1662,8 +1662,8 @@ public class TscShoplinkerService {
 	 * @author jmh
 	 * @since 2020. 5. 21
 	 */
-	public Collection<ShoplinkerGoods> getStockListList(ShoplinkerSearch shoplinkerSearch) {
-		return shoplinkerDao.getStockListList(shoplinkerSearch);
+	public Collection<ShoplinkerGoods> getStockList(ShoplinkerSearch shoplinkerSearch) {
+		return shoplinkerDao.getStockList(shoplinkerSearch);
 	}
 
 	/**

+ 8 - 1
src/main/java/com/style24/persistence/domain/ShoplinkerInvoice.java

@@ -1,5 +1,6 @@
 package com.style24.persistence.domain;
 
+import com.fasterxml.jackson.annotation.JsonFormat;
 import com.style24.persistence.TscBaseDomain;
 import com.style24.persistence.TscPageRequest;
 
@@ -44,12 +45,18 @@ public class ShoplinkerInvoice extends TscBaseDomain {
 	private String ordExchGb;					// 주문교환구분
 	private String ordDtlStat;					// 주문상세상태
 	private String ordDtlStatNm;				// 주문상세상태명
+	private String shipCompNm;					// 배송업체
 
+	// 검색
 	private String stDate;
 	private String edDate;
 	private String uploadFailCd;
 	private String regNm;
-	private String shipCompNm;	// 배송업체
+	private String search; 						// 키워드 종류
+	private String condition; 					// 키워드 종류별 값
+
+	@JsonFormat(with = JsonFormat.Feature.ACCEPT_SINGLE_VALUE_AS_ARRAY)
+	private String[] conditionList;
 
 	// Pagination
 	private TscPageRequest pageable;

+ 6 - 0
src/main/java/com/style24/persistence/domain/ShoplinkerOrder.java

@@ -1,5 +1,6 @@
 package com.style24.persistence.domain;
 
+import com.fasterxml.jackson.annotation.JsonFormat;
 import com.style24.persistence.TscBaseDomain;
 import com.style24.persistence.TscPageRequest;
 
@@ -108,6 +109,11 @@ public class ShoplinkerOrder extends TscBaseDomain {
 	// 검색
 	private int startRow;
 	private int endRow;
+	private String search; 						// 키워드 종류
+	private String condition; 					// 키워드 종류별 값
+
+	@JsonFormat(with = JsonFormat.Feature.ACCEPT_SINGLE_VALUE_AS_ARRAY)
+	private String[] conditionList;
 
 	// Pagination
 	private TscPageRequest pageable;

+ 61 - 46
src/main/java/com/style24/persistence/mybatis/shop/TscShoplinker.xml

@@ -339,13 +339,14 @@
 		        <if test="goodsCd != null and goodsCd != ''">
 		        AND UPPER(A.GOODS_CD) LIKE CONCAT('%',UPPER(#{goodsCd}),'%')
 		        </if>
-		        <if test="arrGoodsCd != null and arrGoodsCd.length>0">
+		    	<if test="conditionList != null and conditionList.length>0">
 		        AND UPPER(A.GOODS_CD) IN
-		            <foreach collection="arrGoodsCd" item="item" index="index"  open="(" close=")" separator=",">
-		        UPPER(#{item})
+		            <foreach collection="conditionList" item="item" index="index"  open="(" close=")" separator=",">
+		       		UPPER(#{item})
 		            </foreach>
 		        </if>
-		         <if test="goodsNm != null and goodsNm != ''">
+
+		        <if test="goodsNm != null and goodsNm != ''">
 		        AND UPPER(A.GOODS_NM) LIKE CONCAT('%',UPPER(#{goodsNm}),'%')
 		        </if>
 		        <if test="brandCd != null and brandCd != ''">
@@ -596,26 +597,14 @@
 	<!-- 샵링커주문수집 조건 정보 -->
 	<sql id="getSlkOrderListCondition_sql">
 
-			<if test="dtGb != null and dtGb == 'orderRegDate'">
-				<if test="stDate != null and stDate != ''">
-		        AND A.ORDER_REG_DATE >= DATE_FORMAT(replace(#{stDate}, '-', ''), '%Y%m%d%H%i%S')
-	            </if>
-	            <if test="edDate != null and edDate != ''">
-	            <![CDATA[
-		        AND A.ORDER_REG_DATE < DATE_FORMAT(DATE_ADD(replace(#{edDate}, '-', ''), INTERVAL 1 DAY), '%Y%m%d%H%i%S')
-	            ]]>
-	            </if>
-			</if>
-			<if test="dtGb != null and dtGb == 'orderdate'">
-				<if test="stDate != null and stDate != ''">
-		        AND A.ORDERDATE >= DATE_FORMAT(replace(#{stDate}, '-', ''), '%Y%m%d%H%i%S')
-	            </if>
-	            <if test="edDate != null and edDate != ''">
-	            <![CDATA[
-		        AND A.ORDERDATE < DATE_FORMAT(DATE_ADD(replace(#{edDate}, '-', ''), INTERVAL 1 DAY), '%Y%m%d%H%i%S')
-	            ]]>
-	            </if>
-			</if>
+			<if test="stDate != null and stDate != ''">
+	        AND A.ORDER_REG_DATE >= DATE_FORMAT(replace(#{stDate}, '-', ''), '%Y%m%d%H%i%S')
+            </if>
+            <if test="edDate != null and edDate != ''">
+            <![CDATA[
+	        AND A.ORDER_REG_DATE < DATE_FORMAT(DATE_ADD(replace(#{edDate}, '-', ''), INTERVAL 1 DAY), '%Y%m%d%H%i%S')
+            ]]>
+            </if>
 
 			<if test="extmallId != null and extmallId != ''">
 	        AND MALL_ID = #{extmallId}
@@ -628,14 +617,29 @@
 	        AND UPLOAD_FAIL_CD = #{uploadFailCd}
 	        </if>
 
-	        <if test="shoplinkerOrderId != null and shoplinkerOrderId != ''">
-	        AND SHOPLINKER_ORDER_ID = #{shoplinkerOrderId}
-	        </if>
-	        <if test="mallOrderId != null and mallOrderId != ''">
-	        AND MALL_ORDER_ID = #{mallOrderId}
-	        </if>
-	        <if test="ordNo != null and ordNo != ''">
-	        AND ORD_NO = #{ordNo}
+	        <if test='conditionList != null and conditionList.length>0'>
+	            <choose>
+	              <when test='search != null and search == "shoplinkerOrderId"'>
+	              	AND UPPER(A.SHOPLINKER_ORDER_ID) IN
+			            <foreach collection="conditionList" item="item" index="index"  open="(" close=")" separator=",">
+			       		UPPER(#{item})
+			            </foreach>
+	              </when>
+
+	              <when test='search != null and search == "mallOrderId"'>
+	              	AND UPPER(A.MALL_ORDER_ID) IN
+			            <foreach collection="conditionList" item="item" index="index"  open="(" close=")" separator=",">
+			       		UPPER(#{item})
+			            </foreach>
+	              </when>
+
+	              <when test='search != null and search == "ordNo"'>
+	              	AND UPPER(A.ORD_NO) IN
+			            <foreach collection="conditionList" item="item" index="index"  open="(" close=")" separator=",">
+			       		UPPER(#{item})
+			            </foreach>
+	              </when>
+	            </choose>
 	        </if>
 	</sql>
 
@@ -801,22 +805,33 @@
             ]]>
             </if>
 
-			<if test="extmallId != null and extmallId != ''">
-	        AND EXTMALL_ID = #{extmallId}
-	        </if>
-
 	        <if test="apiResult != null and apiResult != ''">
 	        AND API_RESULT = #{apiResult}
 	        </if>
 
-	        <if test="agentOrderId != null and agentOrderId != ''">
-	        AND AGENT_ORDER_ID = #{agentOrderId}
-	        </if>
-	        <if test="extmallOrderId != null and extmallOrderId != ''">
-	        AND EXTMALL_ORDER_ID = #{extmallOrderId}
-	        </if>
-	        <if test="ordNo != null and ordNo != ''">
-	        AND ORD_NO = #{ordNo}
+			<if test='conditionList != null and conditionList.length>0'>
+	            <choose>
+	              <when test='search != null and search == "agentOrderId"'>
+	              	AND UPPER(A.AGENT_ORDER_ID) IN
+			            <foreach collection="conditionList" item="item" index="index"  open="(" close=")" separator=",">
+			       		UPPER(#{item})
+			            </foreach>
+	              </when>
+
+	              <when test='search != null and search == "extmallOrderId"'>
+	              	AND UPPER(A.EXTMALL_ORDER_ID) IN
+			            <foreach collection="conditionList" item="item" index="index"  open="(" close=")" separator=",">
+			       		UPPER(#{item})
+			            </foreach>
+	              </when>
+
+	              <when test='search != null and search == "ordNo"'>
+	              	AND UPPER(A.ORD_NO) IN
+			            <foreach collection="conditionList" item="item" index="index"  open="(" close=")" separator=",">
+			       		UPPER(#{item})
+			            </foreach>
+	              </when>
+	            </choose>
 	        </if>
 	</sql>
 
@@ -867,8 +882,8 @@
 	</select>
 
 	<!-- 재고전송-목록 -->
-	<select id="getStockListList" parameterType="ShoplinkerSearch" resultType="ShoplinkerGoods">
-		/* TscShoplinkerDao.getStockListList */
+	<select id="getStockList" parameterType="ShoplinkerSearch" resultType="ShoplinkerGoods">
+		/* TscShoplinkerDao.getStockList */
 		SELECT * FROM
 		(
 			SELECT