Просмотр исходного кода

휴대전화번호, 이름, 이메일 마스킹 처리

gagamel 5 лет назад
Родитель
Сommit
3253abf620

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

@@ -1,5 +1,6 @@
 package com.style24.persistence.domain;
 
+import com.style24.core.support.util.CryptoUtils;
 import com.style24.core.support.util.MaskingUtils;
 import com.style24.persistence.TscBaseDomain;
 import com.style24.scm.support.security.session.TssSession;
@@ -66,20 +67,36 @@ public class Counsel extends TscBaseDomain {
 	private String termStdt;		// 검색시작날짜
 	private String termEddt;		// 검색끝날짜
 
+	// 암호화 대상 복호화 처리
+	public String getCustNm() {
+		this.custNm = CryptoUtils.decryptAES(this.custNm);
+		return this.custNm;
+	}
+
+	public String getCellPhnno() {
+		this.cellPhnno = CryptoUtils.decryptAES(this.cellPhnno);
+		return this.cellPhnno;
+	}
+
+	public String getEmail() {
+		this.email = CryptoUtils.decryptAES(this.email);
+		return this.email;
+	}
+
 	public String getMaskingCustId() {
 		return TssSession.getInfo().getMaskingYn().equals("Y") ? MaskingUtils.id(custId) : custId;
 	}
 
 	public String getMaskingCustNm() {
-		return TssSession.getInfo().getMaskingYn().equals("Y") ? MaskingUtils.name(custNm) : custNm;
+		return TssSession.getInfo().getMaskingYn().equals("Y") ? MaskingUtils.name(getCustNm()) : getCustNm();
 	}
 
 	public String getMaskingCellPhnno() {
-		return TssSession.getInfo().getMaskingYn().equals("Y") ? MaskingUtils.phoneNo(cellPhnno) : cellPhnno;
+		return TssSession.getInfo().getMaskingYn().equals("Y") ? MaskingUtils.phoneNo(getCellPhnno()) : getCellPhnno();
 	}
 
 	public String getMaskingEmail() {
-		return TssSession.getInfo().getMaskingYn().equals("Y") ? MaskingUtils.email(email) : email;
+		return TssSession.getInfo().getMaskingYn().equals("Y") ? MaskingUtils.email(getEmail()) : getEmail();
 	}
 
 }

+ 1 - 1
src/main/webapp/WEB-INF/views/customer/GoodsQnaDetailForm.html

@@ -57,7 +57,7 @@
 							<td th:text="*{siteNm}"></td>
 							<td>상품문의</td>
 							<td th:text="*{questDt}"></td>
-							<td th:utext="*{custNm + ' / ' + cellPhnno + '<br/>' + email}"></td>
+							<td th:utext="*{maskingCustNm + ' / ' + maskingCellPhnno + '<br/>' + maskingEmail}"></td>
 							<td th:utext="*{ansTransYn == 'Y' ? ansTransDt + '<br/>' + ansCompNm : ''}"></td>
 							<td th:utext="*{ansStat == 'G060_20' ? ansStatNm + ' / ' + ansDt + '<br/>' + ansNm : ansStatNm}"></td>
 						</tr>

+ 1 - 4
src/main/webapp/WEB-INF/views/customer/GoodsQnaForm.html

@@ -122,10 +122,7 @@
 				return '<img width="60" src="' + _goodsUrl +  "/" + params.value + '" alt="" onerror="this.src=\'/image/no.png\';"/>';
 			}
 		},
-		{
-			headerName: "상품코드", field: "relGoodsCd", width: 100, cellClass: 'text-center',
-			cellRenderer: function(params) { return '<a href="javascript:void(0);">' + params.value + '</a>'; }
-		},
+		{headerName: "상품코드", field: "relGoodsCd", width: 100, cellClass: 'text-center'},
 		{headerName: "상품명", field: "goodsNm", width: 300},
 		{
 			headerName: "비밀글여부", field: "secretYn", width: 100, cellClass: 'text-center',