Prechádzať zdrojové kódy

Merge branch 'develop' of http://112.172.147.34:4936/style24/style24.core.git into develop

gagamel 4 rokov pred
rodič
commit
ae0be53215

+ 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);
 
 }

+ 16 - 6
src/main/java/com/style24/core/biz/service/TscOrderChangeService.java

@@ -193,6 +193,9 @@ public class TscOrderChangeService {
 		// 3. 주문변경정보, 주문정보, 환불정보 (배송정책코드 별)
 		List<Payment> pgList = new ArrayList<>();
 		List<GiftCard> cashReceiptsList = new ArrayList<>();
+		
+		log.info("cancelDelvRefundList.size() ::: {}", cancelDelvRefundList.size());
+		
 		for (Order obj : cancelDelvRefundList) {
 			// 취소금액 있을 시 처리
 			if (obj.getCnclRtnAmt() > 0) {
@@ -318,8 +321,6 @@ public class TscOrderChangeService {
 							orderDetailItem.setRegNo(userNo);
 							orderDetailItem.setUpdNo(userNo);
 							orderDetailItem.setOrdDtlStat(ordDtlStat);
-
-							orderChangeDao.updateOrderDetailItem(orderDetailItem);
 							
 							// 2021.06.25 취소완료 (취소) (정산구분값추가)
 							// 품절취소
@@ -335,6 +336,8 @@ public class TscOrderChangeService {
 
 							orderChangeDao.createOrderDetailItemHst(orderDetailItem);
 
+							orderChangeDao.updateOrderDetailItem(orderDetailItem);
+
 							index++;
 						}
 
@@ -458,7 +461,7 @@ public class TscOrderChangeService {
 					orderChangeDao.createSellQty(orderChange);
 				}
 
-				// 3-4. PG 결제 취소 정보 설정 (상품권으로만 결제 시 PG점프)
+				// 3-4. PG 결제 취소 정보 설정 (상품권으로만 결제 시 PG점프)				
 				int spanRealCnclRtnAmt = obj.getRealOrdAmt();			// 취소금액합계
 				int sumDeliveryFee = obj.getDelvFee();					// 배송비합계
 				int spanDelvCpnDcAmt = obj.getDelvCpnDcAmt();			// 배송비쿠폰금액
@@ -512,6 +515,9 @@ public class TscOrderChangeService {
 				pg.setRegNo(userNo);
 				pg.setUpdNo(userNo);
 				
+				log.info("pg.getPartCancelAmt() ::: {}", pg.getPartCancelAmt());
+				log.info("pg.getLeftAmt() ::: {}", pg.getLeftAmt());
+				
 				if (spanRefundAmt > 0) {
 					pgList.add(pg);
 				}
@@ -1583,9 +1589,13 @@ public class TscOrderChangeService {
 		orderChangeDao.createOrderDetailHstForAllCancel(orderDetail);
 
 		// 주문상세단품정보 수정 및 이력 등록
-		orderChangeDao.updateOrderDetailItemForAllCancel(orderDetail);
+		// 2021.06.25 전체취소 (취소완료) (정산구분값추가)
+		orderDetail.setOrdChgSq(ordChgSq);
+		orderDetail.setOrdDtlStat(TscConstants.OrdDtlItemStat.SALE_RETURN_CANCEL.value());
 		orderChangeDao.createOrderDetailItemHstForAllCancel(orderDetail);
 		
+		orderChangeDao.updateOrderDetailItemForAllCancel(orderDetail);
+		
 		// 10. WMS 취소 처리
 		List<Order> wmsList = new ArrayList<>();
 		if(orderChange.getOrdDtlNoArr() != null && orderChange.getOrdDtlNoArr().length > 0) {
@@ -2094,8 +2104,6 @@ public class TscOrderChangeService {
 							orderDetailItem.setRegNo(userNo);
 							orderDetailItem.setUpdNo(userNo);
 							orderDetailItem.setOrdDtlStat(ordDtlStat);
-
-							orderChangeDao.updateOrderDetailItem(orderDetailItem);
 							
 							// 2021.06.25 환불컨펌 (반품완료) (정산구분값추가)
 							orderDetailItem.setOrdDtlStat(TscConstants.OrdDtlItemStat.SALE_RETURN_RETURN_COMPLETE.value());
@@ -2103,6 +2111,8 @@ public class TscOrderChangeService {
 							orderDetailItem.setOrdChgSq(ordChgSq);
 							orderChangeDao.createOrderDetailItemHst(orderDetailItem);
 
+							orderChangeDao.updateOrderDetailItem(orderDetailItem);
+
 							index++;
 						}
 

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

@@ -892,19 +892,11 @@ public class TscShoplinkerService {
 			}
 
 			// 생성 파일삭제
-			// GagaFileUtil.deleteFile(GagaFileUtil.getConcatenationPath(map.getXmlPath(), xmlFileName.toString()));
+			GagaFileUtil.deleteFile(GagaFileUtil.getConcatenationPath(map.getXmlPath(), xmlFileName.toString()));
 
 		} catch (Exception e) {
 			log.error("error", e);
-			// 임시
-			StringBuilder xmlFileName = new StringBuilder();
-			xmlFileName.append(fileNm+"_"+fileAddNm).append(".xml");
-			String xmlPath = GagaFileUtil.getConcatenationPath(map.getXmlPath(), xmlFileName.toString());
-			String xmlUrl = GagaFileUtil.getConcatenationPath(map.getDomainUrl(), xmlFileName.toString());
-			String slFolder = GagaFileUtil.getConcatenationPath(env.getProperty("shoplinker.xml.path"));
-			File slPath = new File(slFolder);
-			map.setXmlTxt(slPath.exists()+"\n"+xmlPath+"\n"+xmlUrl+"\n\n"+sbRequest.toString());
-			//map.setXmlTxt(sbRequest.toString());
+			map.setXmlTxt(sbRequest.toString());
 			map.setApiResult("error");
 			map.setApiMessage("API 통신오류");
 		}
@@ -1004,7 +996,7 @@ public class TscShoplinkerService {
 		currentlyPage = map.getInt("currentlyPage");
 		currListCount = map.getInt("currListCount");
 
-		slkSearch.setTxt(shoplinkerOrder.getApiStDate()+ " 총페이지: "+totalPage+ "("+totalCount+"건) || "+currentlyPage);
+		slkSearch.setTxt("["+shoplinkerOrder.getInfoStr()+"]"+ " 총페이지: "+totalPage+ "("+totalCount+"건) || "+currentlyPage);
 		updateCallApiRunable(slkSearch);
 
 		if( currentlyPage < 1 ) currentlyPage = 1;
@@ -1068,9 +1060,14 @@ public class TscShoplinkerService {
 			*/
 			sbRequest.append("			<customer_id>").append("a0021915").append("</customer_id>\n");
 			sbRequest.append("			<shoplinker_id><![CDATA[").append("yes2424").append("]]></shoplinker_id>\n");
-			sbRequest.append("			<order_flag>004</order_flag>\n");// 테스트용
-			sbRequest.append("			<st_date>").append(shoplinkerOrder.getApiStDate().replace("-", "")).append("</st_date>\n");
-			sbRequest.append("			<ed_date>").append(shoplinkerOrder.getApiStDate().replace("-", "")).append("</ed_date>\n");
+			sbRequest.append("			<order_flag>004</order_flag>\n"); // 테스트용
+			sbRequest.append("			<st_date>").append(shoplinkerOrder.getStDate().replace("-", "")).append("</st_date>\n");
+			sbRequest.append("			<ed_date>").append(shoplinkerOrder.getEdDate().replace("-", "")).append("</ed_date>\n");
+			if( "BATCH".equals(shoplinkerOrder.getAcType())){
+				sbRequest.append("			<sdt_time>").append(shoplinkerOrder.getStTime()).append("</sdt_time>\n");
+				sbRequest.append("			<edt_time>").append(shoplinkerOrder.getEdTime()).append("</edt_time>\n");
+			}
+
 			sbRequest.append("			<page_no>").append(shoplinkerOrder.getOrderPageNo()).append("</page_no>\n");
 
 			sbRequest.append("		</Order>\n");
@@ -1171,8 +1168,8 @@ public class TscShoplinkerService {
 
 			}else {
 				// 테스트용
-				xmlUrl = "http://ts5000.ipdisk.co.kr:8999/shoplinker/order/0409/order_real_"+shoplinkerOrder.getOrderPageNo()+".xml";
-				xmlUrl = "http://ts5000.ipdisk.co.kr:8999/shoplinker/order/order_time.xml";
+				xmlUrl = "http://ts5000.ipdisk.co.kr:8999/shoplinker/order/0528/order_real_"+shoplinkerOrder.getOrderPageNo()+".xml";
+				//xmlUrl = "http://ts5000.ipdisk.co.kr:8999/shoplinker/order/order_time.xml";
 
 				try {
 					// API 호출
@@ -1259,7 +1256,7 @@ public class TscShoplinkerService {
 			returnMap.setString("RESULT_TYPE", "TRUE");
 
 			// 생성 파일삭제
-			GagaFileUtil.deleteFile(GagaFileUtil.getConcatenationPath(shoplinkerOrder.getXmlPath(), xmlFileName.toString()));
+			// GagaFileUtil.deleteFile(GagaFileUtil.getConcatenationPath(shoplinkerOrder.getXmlPath(), xmlFileName.toString()));
 
 		}catch(Exception e) {
 			log.error("xml 생성오류 ", e);
@@ -1479,7 +1476,12 @@ public class TscShoplinkerService {
 					resultMsg = (com.gagaframework.shoplinker.domain.invoice.ResultMessage)shoplinkerUtil.unmarshal(com.gagaframework.shoplinker.domain.invoice.ResultMessage.class, responseXmlData);
 
 					apiHstMap.setApiType("INVOICE");
-					apiHstMap.setXmlTxt(sbRequest.toString());
+
+					String slFolder = GagaFileUtil.getConcatenationPath(env.getProperty("shoplinker.xml.path")+"/invoice");
+					File slPath = new File(slFolder);
+					apiHstMap.setXmlTxt(slPath.exists()+"\n"+xmlPath+"\n"+xmlUrl+"\n\n"+sbRequest.toString());
+
+					//apiHstMap.setXmlTxt(sbRequest.toString());
 					apiHstMap.setOrdDtlNo(info.getOrdDtlNo());
 					apiHstMap.setApiResult(resultMsg.getResult());
 					apiHstMap.setApiMessage(resultMsg.getMessage());
@@ -1490,7 +1492,16 @@ public class TscShoplinkerService {
 				} catch (Exception e) {
 					log.error("error", e);
 					apiHstMap.setApiType("INVOICE");
-					apiHstMap.setXmlTxt(sbRequest.toString());
+
+					StringBuilder xmlFileName = new StringBuilder();
+					xmlFileName.append("invoice_"+info.getOrdDtlNo()+"_"+fileAddNm).append(".xml");
+					String xmlPath = GagaFileUtil.getConcatenationPath(shoplinkerInvoice.getXmlPath(), xmlFileName.toString());
+					String xmlUrl = GagaFileUtil.getConcatenationPath(shoplinkerInvoice.getDomainUrl(), xmlFileName.toString());
+					String slFolder = GagaFileUtil.getConcatenationPath(env.getProperty("shoplinker.xml.path")+"/invoice");
+					File slPath = new File(slFolder);
+					apiHstMap.setXmlTxt(slPath.exists()+"\n"+xmlPath+"\n"+xmlUrl+"\n\n"+sbRequest.toString());
+
+					// apiHstMap.setXmlTxt(sbRequest.toString());
 					apiHstMap.setOrdDtlNo(info.getOrdDtlNo());
 					apiHstMap.setApiResult("error");
 					apiHstMap.setApiMessage("API 통신오류");
@@ -1651,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);
 	}
 
 	/**

+ 54 - 2
src/main/java/com/style24/core/support/util/CryptoUtils.java

@@ -24,6 +24,57 @@ public class CryptoUtils {
 	private static final String AES_KEY = "dPtm24dnpqtjqltmdkaghsmsqlalf!@#";
 	private static final byte[] IV_BYTES = new byte[] {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
 
+	/**
+	 * YES24용 AES 암호화 처리
+	 * @param rawValue - 원시문자열
+	 * @return String - 암호화문자열
+	 */
+	public static String encryptAES(String rawValue) {
+		String encryptedValue = "";
+
+		try {
+			if (StringUtils.isNotBlank(rawValue)) {
+				byte[] keyBytes = AES_KEY.getBytes("UTF-8");
+				SecretKeySpec keySpec = new SecretKeySpec(keyBytes, "AES");
+				Cipher cipher = Cipher.getInstance("AES/CBC/PKCS5Padding");
+				cipher.init(Cipher.ENCRYPT_MODE, keySpec, new IvParameterSpec(IV_BYTES));
+				encryptedValue = Base64.encodeBase64String(cipher.doFinal(rawValue.getBytes("UTF-8")));
+			}
+		} catch (Exception e) {
+			//log.error(e.getMessage());
+			encryptedValue = rawValue;
+		}
+
+		return encryptedValue;
+	}
+
+	/**
+	 * YES24 연동용 AES 복호화 처리
+	 * @param encryptedValue - 암호화된 문자열
+	 * @return String - 복호화문자열
+	 */
+	public static String decryptAES(String encryptedValue) {
+		String decryptedValue = "";
+
+		try {
+			if (StringUtils.isNotBlank(encryptedValue)) {
+				byte[] keyBytes = AES_KEY.getBytes("UTF-8");
+				SecretKeySpec keySpec = new SecretKeySpec(keyBytes, "AES");
+				Cipher cipher = Cipher.getInstance("AES/CBC/PKCS5Padding");
+				cipher.init(Cipher.DECRYPT_MODE, keySpec, new IvParameterSpec(IV_BYTES));
+				decryptedValue = new String(cipher.doFinal(Base64.decodeBase64(encryptedValue.getBytes("UTF-8"))), "UTF-8");
+				if (StringUtils.isBlank(decryptedValue)) {
+					decryptedValue = encryptedValue;
+				}
+			}
+		} catch (Exception e) {
+			//log.error(e.getMessage());
+			decryptedValue = encryptedValue;
+		}
+
+		return decryptedValue;
+	}
+
 	/**
 	 * YES24용 AES 암호화 처리
 	 * @param rawValue - 원시문자열
@@ -75,6 +126,7 @@ public class CryptoUtils {
 		return decryptedValue;
 	}
 
+
 	/**
 	 * JAVA에서는 AES키는 16byte이지만, MySQL에서는 16byte 이상도 지원하기에 MySQL의 16byte 이상의 키를 생성해야 한다.
 	 * 16byte 이상은 잘라서 다시 앞쪽부터 byte 단위로 XOR 시켜서 16byte 키로 생성
@@ -100,7 +152,7 @@ public class CryptoUtils {
 	 * @param rawValue - 원시문자열
 	 * @return String - 암호화문자열
 	 */
-	public static String encryptAES(String rawValue) {
+	public static String newEncryptAES(String rawValue) {
 		String encryptedValue = "";
 
 		try {
@@ -121,7 +173,7 @@ public class CryptoUtils {
 	 * @param encryptedValue - 암호화된 문자열
 	 * @return String - 복호화문자열
 	 */
-	public static String decryptAES(String encryptedValue) {
+	public static String newDecryptAES(String encryptedValue) {
 		String decryptedValue = "";
 
 		try {

+ 9 - 9
src/main/java/com/style24/persistence/domain/Order.java

@@ -426,12 +426,12 @@ public class Order extends TscBaseDomain {
 	private String bankNm;
 
 	public String getAccountNo() {
-		this.accountNo = CryptoUtils.decryptAES(this.accountNo);
+		this.accountNo = CryptoUtils.decryptYes24AES(this.accountNo);
 		return this.accountNo;
 	}
 
 	public void encryptData () {
-		this.encodedAccountNo = CryptoUtils.encryptAES(this.accountNo);
+		this.encodedAccountNo = CryptoUtils.encryptYes24AES(this.accountNo);
 	}
 
 	private int realDelvAmt;
@@ -606,27 +606,27 @@ public class Order extends TscBaseDomain {
 
 	// 암호화 대상 복호화 처리
 	public String getCustNm() {
-		this.custNm = CryptoUtils.decryptAES(this.custNm);
+		this.custNm = CryptoUtils.decryptYes24AES(this.custNm);
 		return this.custNm;
 	}
 
 	public String getEmail() {
-		this.email = CryptoUtils.decryptAES(this.email);
+		this.email = CryptoUtils.decryptYes24AES(this.email);
 		return this.email;
 	}
 
 	public String getCellPhnno() {
-		this.cellPhnno = CryptoUtils.decryptAES(this.cellPhnno);
+		this.cellPhnno = CryptoUtils.decryptYes24AES(this.cellPhnno);
 		return this.cellPhnno;
 	}
 
 	public String getRecipBaseAddr() {
-		this.recipBaseAddr = CryptoUtils.decryptAES(this.recipBaseAddr);
+		this.recipBaseAddr = CryptoUtils.decryptYes24AES(this.recipBaseAddr);
 		return this.recipBaseAddr;
 	}
 
 	public String getRecipDtlAddr() {
-		this.recipDtlAddr = CryptoUtils.decryptAES(this.recipDtlAddr);
+		this.recipDtlAddr = CryptoUtils.decryptYes24AES(this.recipDtlAddr);
 		return this.recipDtlAddr;
 	}
 
@@ -685,12 +685,12 @@ public class Order extends TscBaseDomain {
 	private String birthGen;			// 보증보험(생년월일 + 성별)
 
 	public String getBirthYmd() {
-		this.birthYmd = CryptoUtils.decryptAES(this.birthYmd);
+		this.birthYmd = CryptoUtils.decryptYes24AES(this.birthYmd);
 		return this.birthYmd;
 	}
 
 	public String getSexGb() {
-		this.sexGb = CryptoUtils.decryptAES(this.sexGb);
+		this.sexGb = CryptoUtils.decryptYes24AES(this.sexGb);
 		return this.sexGb;
 	}
 

+ 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;

+ 12 - 2
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;
 
@@ -19,10 +20,13 @@ public class ShoplinkerOrder extends TscBaseDomain {
 	private String customerId; 					// 고객사 코드(샵링커 가입코드)
 	private String shoplinkerId;
 	private String orderFlag; 					// 주문타입 - 일반[신규OR발주]:000/ 발주확인:007/ 정산확정: 002/ 송장등록:003/ 송장전송완료:004
-	private String stDate;
-	private String edDate;
+	private String stDate;						// 시작날짜 YYYMMDD
+	private String edDate;						// 종료날짜 YYMMDD
+	private String stTime;						// 시작시간 HH24MISS
+	private String edTime;						// 종료시간 HH24MISS
 	private Integer orderPageNo;
 	private String apiStDate;
+	private String infoStr;
 
 	// Response
 	private Integer orderIfIdx; 				// 주문수집차수
@@ -105,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;
@@ -113,6 +122,7 @@ public class ShoplinkerOrder extends TscBaseDomain {
 	private int pageUnit = 10;
 
 	private String sid;
+	private String acType = "";					// 실행위치 BATCH:배치 /  ADMIN :관리자
 
 	public ShoplinkerOrder() {
 

+ 17 - 12
src/main/java/com/style24/persistence/mybatis/shop/TscOrderChange.xml

@@ -565,16 +565,16 @@
 		     , OD.ORD_QTY
 		     , #{cnclRtnAmt}
 		     , #{cnclRtnQty}
-		     , #{cpn1DcAmt}
-		     , #{tmtb1DcAmt}
-		     , #{tmtb2DcAmt}
-		     , #{goodsCpnDcAmt}
-		     , #{cartCpnDcAmt}
-		     , #{pntDcAmt}
-		     , #{prePntDcAmt}
-		     , #{savePntAmt}
-		     , #{realOrdAmt}
-		     , #{gfcdUseAmt}
+		     , ODI.CPN1_DC_AMT - #{cpn1DcAmt}
+		     , ODI.TMTB1_DC_AMT - #{tmtb1DcAmt}
+		     , ODI.TMTB2_DC_AMT - #{tmtb2DcAmt}
+		     , ODI.GOODS_CPN_DC_AMT - #{goodsCpnDcAmt}
+		     , ODI.CART_CPN_DC_AMT - #{cartCpnDcAmt}
+		     , ODI.PNT_DC_AMT - #{pntDcAmt}
+		     , ODI.PRE_PNT_DC_AMT - #{prePntDcAmt}
+		     , ODI.SAVE_PNT_AMT - #{savePntAmt}
+		     , ODI.REAL_ORD_AMT - #{realOrdAmt}
+		     , ODI.GFCD_USE_AMT - #{gfcdUseAmt}
 		     , #{ordChgSq}
 		     , #{regNo}
 		     , NOW()
@@ -2388,6 +2388,7 @@
 		     , SAVE_PNT_AMT
 		     , REAL_ORD_AMT
 		     , GFCD_USE_AMT
+		     , ORD_CHG_SQ
 		     , REG_NO
 		     , REG_DT
 		     , UPD_NO
@@ -2396,7 +2397,7 @@
 		SELECT ODI.ORD_DTL_ITEM_SQ
 		     , ODI.ORD_DTL_NO
 		     , ODI.ORD_NO
-		     , 'G720_30'
+		     , #{ordDtlStat}
 		     , ODI.ITEM_CD
 		     , ODI.OPT_CD
 		     , ODI.OPT_CD1
@@ -2410,7 +2411,7 @@
 		     , ODI.DISP_ORD
 		     , ODI.ORD_AMT
 		     , OD.ORD_QTY
-		     , ODI.CNCL_RTN_AMT
+		     , ODI.ORD_AMT
 		     , OD.CNCL_RTN_QTY
 		     , ODI.CPN1_DC_AMT
 		     , ODI.TMTB1_DC_AMT
@@ -2422,6 +2423,7 @@
 		     , ODI.SAVE_PNT_AMT
 		     , ODI.REAL_ORD_AMT
 		     , ODI.GFCD_USE_AMT
+		     , #{ordChgSq}
 		     , #{regNo}
 		     , NOW()
 		     , #{updNo}
@@ -3005,6 +3007,9 @@
 		     , Z.PAY_STAT
 		     , Z.CASH_AUTH_NO
 		     , Z.DELV_YN
+		 ORDER BY Z.DELV_FEE_CD
+		     , Z.ORD_NO
+		     , Z.ORD_DTL_NO
 	</select>
 	
 	<!-- 결제취소 환불정보 수정 -->

+ 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