jmh 4 éve
szülő
commit
3718d3403a

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

@@ -454,6 +454,12 @@ public class TscShoplinkerService {
 					extmallOrder.setRecipDtlAddr(addrMap.getString("addrDtl"));
 				}
 
+				// 연락처하이픈처리
+				extmallOrder.setHypenCellPhone();
+				extmallOrder.setHypenCellTel();
+				extmallOrder.setHypenRecipPhone();
+				extmallOrder.setHypenRecipTel();
+				
 				orderOcmDao.insertExtmallOrder(extmallOrder);
 
 			}catch(Exception e) {

+ 32 - 8
src/main/java/com/style24/persistence/domain/ExtmallOrder.java

@@ -683,22 +683,34 @@ public class ExtmallOrder extends TscBaseDomain {
 	@JsonFormat(with = JsonFormat.Feature.ACCEPT_SINGLE_VALUE_AS_ARRAY)
 	private String[] payTypeArr;
 
-	// 휴대폰 번호 대쉬 붙이기
+	// 주문자 휴대폰 번호 대쉬 붙이기
 	public void setHypenCellPhone() {
-		if (StringUtils.isNotBlank(this.cellPhnno)) {
-			String tempCellPhone = this.cellPhnno.replaceAll("-","");
+		if (StringUtils.isNotBlank(this.ordPhnno)) {
+			String tempCellPhone = this.ordPhnno.replaceAll("-","");
 			if (tempCellPhone.length() == 12) {
-				this.cellPhnno = tempCellPhone.replaceFirst("(^[0-9]{4})([0-9]{4})([0-9]{4})$", "$1-$2-$3");
+				this.ordPhnno = tempCellPhone.replaceFirst("(^[0-9]{4})([0-9]{4})([0-9]{4})$", "$1-$2-$3");
 			} else {
-				this.cellPhnno = tempCellPhone.replaceFirst("(^02|[0-9]{3})([0-9]{3,4})([0-9]{4})$", "$1-$2-$3");
+				this.ordPhnno = tempCellPhone.replaceFirst("(^02|[0-9]{3})([0-9]{3,4})([0-9]{4})$", "$1-$2-$3");
 			}
 		}
 	}
 
-	// 휴대폰 번호 대쉬 붙이기
+	// 주문자 일반 번호 대쉬 붙이기
+	public void setHypenCellTel() {
+		if (StringUtils.isNotBlank(this.ordTelno)) {
+			String tempCellPhone = this.ordTelno.replaceAll("-","");
+			if (tempCellPhone.length() == 12) {
+				this.ordTelno = tempCellPhone.replaceFirst("(^[0-9]{4})([0-9]{4})([0-9]{4})$", "$1-$2-$3");
+			} else {
+				this.ordTelno = tempCellPhone.replaceFirst("(^02|[0-9]{3})([0-9]{3,4})([0-9]{4})$", "$1-$2-$3");
+			}
+		}
+	}
+	
+	// 수령자 휴대폰 번호 대쉬 붙이기
 	public void setHypenRecipPhone() {
-		if (StringUtils.isNotBlank(this.cellPhnno)) {
-			String tempRecipPhone = this.cellPhnno.replaceAll("-","");
+		if (StringUtils.isNotBlank(this.recipPhnno)) {
+			String tempRecipPhone = this.recipPhnno.replaceAll("-","");
 			if (tempRecipPhone.length() == 12) {
 				this.recipPhnno = tempRecipPhone.replaceFirst("(^[0-9]{4})([0-9]{4})([0-9]{4})$", "$1-$2-$3");
 			} else {
@@ -706,6 +718,18 @@ public class ExtmallOrder extends TscBaseDomain {
 			}
 		}
 	}
+	
+	// 수령자 일반 번호 대쉬 붙이기
+	public void setHypenRecipTel() {
+		if (StringUtils.isNotBlank(this.recipTelno)) {
+			String tempRecipPhone = this.recipTelno.replaceAll("-","");
+			if (tempRecipPhone.length() == 12) {
+				this.recipTelno = tempRecipPhone.replaceFirst("(^[0-9]{4})([0-9]{4})([0-9]{4})$", "$1-$2-$3");
+			} else {
+				this.recipTelno = tempRecipPhone.replaceFirst("(^02|[0-9]{3})([0-9]{3,4})([0-9]{4})$", "$1-$2-$3");
+			}
+		}
+	}
 
 	private String ifYn;				// 증권 인터페이스 여부 (입금 확인 여부)
 	private String insNo;				// USAFE 보증보험 증권번호

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

@@ -351,8 +351,8 @@
 		     , NOW()
 		     , #{custNo}
 		     , #{custNm}
-		     , #{recipPhnno}
-		     , #{recipTelno}
+		     , #{ordPhnno}
+		     , #{ordTelno}
 		     , #{email}
 		     , 'G000_10'
 		     , #{npayOrdNo}