jsshin пре 5 година
родитељ
комит
ffe1916e51

+ 6 - 2
src/main/java/com/style24/admin/biz/web/TsaCustomerController.java

@@ -4,7 +4,6 @@ import java.util.Collection;
 
 import com.gagaframework.web.parameter.GagaMap;
 import com.gagaframework.web.security.GagaPasswordEncoder;
-import com.gagaframework.web.util.GagaCryptoUtil;
 import com.gagaframework.web.util.GagaStringUtil;
 import com.style24.admin.biz.service.TsaCustomerService;
 import com.style24.admin.biz.service.TsaKakaoService;
@@ -312,7 +311,12 @@ public class TsaCustomerController extends TsaBaseController {
 	@ResponseBody
 	public GagaMap getCustomerActiveList(@RequestBody CustomerSearch customerSearch) {
 		GagaMap result = new GagaMap();
-		customerSearch.setRegNo(TsaSession.getInfo().getUserNo()); // 엑셀조회시 로그인 사용자의 엑셀 상품조회시 사용
+		// 회원명, 이메일 암호화
+		if ("custNm".equals(customerSearch.getSearchGb()) || "email".equals(customerSearch.getSearchGb())) {
+			customerSearch.setSearchTxt(CryptoUtils.encryptAES(customerSearch.getSearchTxt()));
+		}
+		customerSearch.encryptData();	//데이터 암호화 필요
+		customerSearch.setRegNo(TsaSession.getInfo().getUserNo());
 		customerSearch.setPageable(new TscPageRequest(customerSearch.getPageNo()-1, customerSearch.getPageSize()));
 		customerSearch.getPageable().setTotalCount(customerService.getCustomerActiveListCount(customerSearch));
 		TscSession.setAttribute("maskingYn", TsaSession.getInfo().getMaskingYn());

+ 8 - 0
src/main/java/com/style24/persistence/domain/CustomerSearch.java

@@ -1,5 +1,6 @@
 package com.style24.persistence.domain;
 
+import com.style24.core.support.util.CryptoUtils;
 import com.style24.persistence.TscBaseDomain;
 import com.style24.persistence.TscPageRequest;
 import lombok.Data;
@@ -42,4 +43,11 @@ public class CustomerSearch extends TscBaseDomain {
 	private int pageSize = 50;
 	private int pageUnit = 10;
 
+	// 암호화 대상 데이터 암호화 처리
+	public void encryptData () {
+		this.custNm = CryptoUtils.encryptAES(this.custNm);
+		this.cellPhnno = CryptoUtils.encryptAES(this.cellPhnno);
+		this.email = CryptoUtils.encryptAES(this.email);
+	}
+
 }

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

@@ -70,7 +70,7 @@
 		AND    LOWER(CUST_NM) LIKE CONCAT('%',LOWER(#{custNm}),'%')
 		</if>
 		<if test="email != null and email != ''">
-		AND    LOWER(EMAIL) LIKE CONCAT('%',LOWER(#{eamil}),'%')
+		AND    LOWER(EMAIL) LIKE CONCAT('%',LOWER(#{email}),'%')
 		</if>
 		<if test="custId != null and custId != ''">
 		AND    CUST_ID = #{custId}
@@ -182,7 +182,7 @@
 		AND    LOWER(CUST_NM) LIKE CONCAT('%',LOWER(#{custNm}),'%')
 		</if>
 		<if test="email != null and email != ''">
-		AND    LOWER(EMAIL) LIKE CONCAT('%',LOWER(#{eamil}),'%')
+		AND    LOWER(EMAIL) LIKE CONCAT('%',LOWER(#{email}),'%')
 		</if>
 		<if test="custId != null and custId != ''">
 		AND    CUST_ID = #{custId}