Przeglądaj źródła

Merge branch 'develop' into card007

card007 4 lat temu
rodzic
commit
4add1674b9

+ 10 - 54
src/main/java/com/style24/core/biz/service/TscOrderService.java

@@ -1,20 +1,5 @@
 package com.style24.core.biz.service;
 
-import java.nio.charset.StandardCharsets;
-import java.text.NumberFormat;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.List;
-
-import javax.crypto.Cipher;
-import javax.crypto.spec.SecretKeySpec;
-
-import org.apache.commons.lang3.StringUtils;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.core.env.Environment;
-import org.springframework.stereotype.Service;
-import org.springframework.transaction.annotation.Transactional;
-
 import com.fasterxml.jackson.databind.ObjectMapper;
 import com.gagaframework.excel.env.GagaExcelConstants;
 import com.gagaframework.excel.xssf.GagaExcelResultHandler;
@@ -30,10 +15,17 @@ import com.style24.persistence.domain.Order;
 import com.style24.persistence.domain.OrderChange;
 import com.style24.persistence.domain.Point;
 import com.usafe.guarantee.InsuranceManager;
-
 import lombok.extern.slf4j.Slf4j;
-import sun.misc.BASE64Decoder;
-import sun.misc.BASE64Encoder;
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.core.env.Environment;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.text.NumberFormat;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
 
 /**
  * 주문관리 Service
@@ -2516,42 +2508,6 @@ public class TscOrderService {
 		return "SUCCESS";
 	}
 
-	public String encodeStr(String str) throws Exception {
-		byte[] SECRET_KEY = { 115, 51, 117, 70, 49, 65, 107, 125, 43, 118, 48, 65, 38, 57, 77, 67, 74, 120, 90, 87, 78, 80, 101, 102 };
-		SecretKeySpec KEYSPEC = new SecretKeySpec(SECRET_KEY, "DESede");
-
-		String result = null;
-		Cipher cipher = Cipher.getInstance("DESede/ECB/PKCS5Padding");
-		cipher.init(1, KEYSPEC);
-		byte[] plainText = str.getBytes(StandardCharsets.UTF_8);
-		byte[] cipherText = cipher.doFinal(plainText);
-		result = (new BASE64Encoder()).encode(cipherText);
-		return result;
-	}
-
-	public String decodeStr(String str) throws Exception {
-		byte[] SECRET_KEY = { 115, 51, 117, 70, 49, 65, 107, 125, 43, 118, 48, 65, 38, 57, 77, 67, 74, 120, 90, 87, 78, 80, 101, 102 };
-		SecretKeySpec KEYSPEC = new SecretKeySpec(SECRET_KEY, "DESede");
-
-		String result = null;
-		Cipher cipher = Cipher.getInstance("DESede/ECB/PKCS5Padding");
-		cipher.init(2, KEYSPEC);
-		byte[] base64bytes = (new BASE64Decoder()).decodeBuffer(str);
-		byte[] decryptedText = cipher.doFinal(base64bytes);
-		result = new String(decryptedText, StandardCharsets.UTF_8);
-		result = result.trim();
-		return result;
-	}
-
-	public String simpleEncode(String strVal) {
-		String result = strVal;
-		result = result.replaceAll("=", "%3D");
-		result = result.replaceAll("&", "%26");
-		result = result.replaceAll("%", "%25");
-		result = result.replaceAll(" ", "%20");
-		return result;
-	}
-
 	public String simpleDecode(String strVal) {
 		String result = strVal;
 		result = result.replaceAll("%3D", "=");

+ 3 - 0
src/main/java/com/style24/persistence/mybatis/shop/TscOrder.xml

@@ -1104,6 +1104,9 @@
 		/* TscOrder.updateNaverPayOrderNo */
 		UPDATE TB_ORDER SET
 		       NPAY_ORD_NO = #{npayOrdNo}
+		     , ORD_NM      = #{ordNm}
+		     , ORD_PHNNO   = #{ordPhnno}
+		     , ORD_EMAIL   = #{ordEmail}
 		     , UPD_NO      = #{updNo}
 		     , UPD_DT      = NOW()
 		WHERE  ORD_NO      = #{ordNo}