Procházet zdrojové kódy

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

jsh77b před 4 roky
rodič
revize
73ad6e70d5

+ 1 - 0
src/main/java/com/style24/core/biz/service/TscOrderService.java

@@ -1997,6 +1997,7 @@ public class TscOrderService {
 				order.setCardNm(orderInfo.getCardNm());
 				order.setVaBank(orderInfo.getVaBank());
 				order.setVaDeadline(orderInfo.getVaDeadline());
+				order.setVaNm(orderInfo.getVaNm());
 				order.setOrdNm(orderInfo.getOrdNm());
 				order.setOrdEmail(orderInfo.getOrdEmail());
 				order.setOrdPhnno(orderInfo.getOrdPhnno());

+ 5 - 4
src/main/java/com/style24/persistence/domain/Customer.java

@@ -1,13 +1,14 @@
 package com.style24.persistence.domain;
 
+import org.apache.commons.lang3.StringUtils;
 
 import com.style24.core.support.session.TscSession;
 import com.style24.core.support.util.CryptoUtils;
 import com.style24.core.support.util.MaskingUtils;
 import com.style24.persistence.TscBaseDomain;
 import com.style24.persistence.TscPageRequest;
+
 import lombok.Data;
-import org.apache.commons.lang3.StringUtils;
 
 /**
  * 회원 Domain
@@ -202,10 +203,10 @@ public class Customer extends TscBaseDomain {
 			return;
 		}
 		String tempCellPhone = this.cellPhnno.replaceAll("-", "");
-		if (tempCellPhone.length() > 10) {
-			this.cellPhnno = tempCellPhone.substring(0, 3) + "-" + tempCellPhone.substring(3, 7) + "-" + tempCellPhone.substring(7, 11);
+		if (tempCellPhone.length() == 12) {
+			this.cellPhnno = tempCellPhone.replaceFirst("(^[0-9]{4})([0-9]{4})([0-9]{4})$", "$1-$2-$3");
 		} else {
-			this.cellPhnno = tempCellPhone.substring(0, 3) + "-" + tempCellPhone.substring(3, 6) + "-" + tempCellPhone.substring(6, 10);
+			this.cellPhnno = tempCellPhone.replaceFirst("(^02|[0-9]{3})([0-9]{3,4})([0-9]{4})$", "$1-$2-$3");
 		}
 	}
 

+ 7 - 6
src/main/java/com/style24/persistence/domain/ExtmallOrder.java

@@ -5,6 +5,7 @@ import java.util.Collection;
 import java.util.List;
 
 import org.apache.commons.lang3.StringUtils;
+
 import com.fasterxml.jackson.annotation.JsonFormat;
 import com.style24.core.support.util.CryptoUtils;
 import com.style24.persistence.TscBaseDomain;
@@ -686,10 +687,10 @@ public class ExtmallOrder extends TscBaseDomain {
 	public void setHypenCellPhone() {
 		if (StringUtils.isNotBlank(this.cellPhnno)) {
 			String tempCellPhone = this.cellPhnno.replaceAll("-","");
-			if (tempCellPhone.length() > 10) {
-				this.cellPhnno = tempCellPhone.substring(0, 3) + "-" + tempCellPhone.substring(3, 7) + "-" + tempCellPhone.substring(7, 11);
+			if (tempCellPhone.length() == 12) {
+				this.cellPhnno = tempCellPhone.replaceFirst("(^[0-9]{4})([0-9]{4})([0-9]{4})$", "$1-$2-$3");
 			} else {
-				this.cellPhnno = tempCellPhone.substring(0, 3) + "-" + tempCellPhone.substring(3, 6) + "-" + tempCellPhone.substring(6, 10);
+				this.cellPhnno = tempCellPhone.replaceFirst("(^02|[0-9]{3})([0-9]{3,4})([0-9]{4})$", "$1-$2-$3");
 			}
 		}
 	}
@@ -698,10 +699,10 @@ public class ExtmallOrder extends TscBaseDomain {
 	public void setHypenRecipPhone() {
 		if (StringUtils.isNotBlank(this.cellPhnno)) {
 			String tempRecipPhone = this.cellPhnno.replaceAll("-","");
-			if (tempRecipPhone.length() > 10) {
-				this.cellPhnno = tempRecipPhone.substring(0, 3) + "-" + tempRecipPhone.substring(3, 7) + "-" + tempRecipPhone.substring(7, 11);
+			if (tempRecipPhone.length() == 12) {
+				this.recipPhnno = tempRecipPhone.replaceFirst("(^[0-9]{4})([0-9]{4})([0-9]{4})$", "$1-$2-$3");
 			} else {
-				this.cellPhnno = tempRecipPhone.substring(0, 3) + "-" + tempRecipPhone.substring(3, 6) + "-" + tempRecipPhone.substring(6, 10);
+				this.recipPhnno = tempRecipPhone.replaceFirst("(^02|[0-9]{3})([0-9]{3,4})([0-9]{4})$", "$1-$2-$3");
 			}
 		}
 	}

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

@@ -681,10 +681,10 @@ public class Order extends TscBaseDomain {
 	public void setHypenCellPhone() {
 		if (StringUtils.isNotBlank(this.cellPhnno)) {
 			String tempCellPhone = this.cellPhnno.replaceAll("-", "");
-			if (tempCellPhone.length() > 10) {
-				this.cellPhnno = tempCellPhone.substring(0, 3) + "-" + tempCellPhone.substring(3, 7) + "-" + tempCellPhone.substring(7, 11);
+			if (tempCellPhone.length() == 12) {
+				this.cellPhnno = tempCellPhone.replaceFirst("(^[0-9]{4})([0-9]{4})([0-9]{4})$", "$1-$2-$3");
 			} else {
-				this.cellPhnno = tempCellPhone.substring(0, 3) + "-" + tempCellPhone.substring(3, 6) + "-" + tempCellPhone.substring(6, 10);
+				this.cellPhnno = tempCellPhone.replaceFirst("(^02|[0-9]{3})([0-9]{3,4})([0-9]{4})$", "$1-$2-$3");
 			}
 		}
 	}
@@ -693,10 +693,11 @@ public class Order extends TscBaseDomain {
 	public void setHypenRecipPhone() {
 		if (StringUtils.isNotBlank(this.recipPhnno)) {
 			String tempRecipPhone = this.recipPhnno.replaceAll("-", "");
-			if (tempRecipPhone.length() > 10) {
-				this.recipPhnno = tempRecipPhone.substring(0, 3) + "-" + tempRecipPhone.substring(3, 7) + "-" + tempRecipPhone.substring(7, 11);
+
+			if (tempRecipPhone.length() == 12) {
+				this.recipPhnno = tempRecipPhone.replaceFirst("(^[0-9]{4})([0-9]{4})([0-9]{4})$", "$1-$2-$3");
 			} else {
-				this.recipPhnno = tempRecipPhone.substring(0, 3) + "-" + tempRecipPhone.substring(3, 6) + "-" + tempRecipPhone.substring(6, 10);
+				this.recipPhnno = tempRecipPhone.replaceFirst("(^02|[0-9]{3})([0-9]{3,4})([0-9]{4})$", "$1-$2-$3");
 			}
 		}
 	}

+ 3 - 3
src/main/java/com/style24/persistence/domain/OrderChange.java

@@ -286,10 +286,10 @@ public class OrderChange extends TscBaseDomain {
 	public void setHypenRecipPhone() {
 		if (StringUtils.isNotBlank(this.recipPhnno)) {
 			String tempRecipPhone = this.recipPhnno.replaceAll("-", "");
-			if (tempRecipPhone.length() > 10) {
-				this.recipPhnno = tempRecipPhone.substring(0, 3) + "-" + tempRecipPhone.substring(3, 7) + "-" + tempRecipPhone.substring(7, 11);
+			if (tempRecipPhone.length() == 12) {
+				this.recipPhnno = tempRecipPhone.replaceFirst("(^[0-9]{4})([0-9]{4})([0-9]{4})$", "$1-$2-$3");
 			} else {
-				this.recipPhnno = tempRecipPhone.substring(0, 3) + "-" + tempRecipPhone.substring(3, 6) + "-" + tempRecipPhone.substring(6, 10);
+				this.recipPhnno = tempRecipPhone.replaceFirst("(^02|[0-9]{3})([0-9]{3,4})([0-9]{4})$", "$1-$2-$3");
 			}
 		}
 	}

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

@@ -1190,6 +1190,7 @@
 		            ELSE ''
 		            END  VA_BANK
 		     , P.VA_NO
+		     , P.VA_NM
 		     , CASE WHEN P.PAY_MEANS = 'G014_20' || P.PAY_MEANS = 'G014_10'
 		            THEN FN_GET_CODE_NM('G940', P.VA_BANK)
 		            ELSE P.CARD_NM