Pārlūkot izejas kodu

개인정보 마스킹 처리

gagamel 5 gadi atpakaļ
vecāks
revīzija
c23b787b08

+ 7 - 2
src/main/java/com/style24/persistence/domain/Counsel.java

@@ -82,12 +82,17 @@ public class Counsel extends TscBaseDomain {
 		return this.custNm;
 	}
 
+	public String getEmail() {
+		this.email = CryptoUtils.decryptAES(this.email);
+		return this.email;
+	}
+
 	public String getMaskingCustId() {
 		return TsaSession.getInfo().getMaskingYn().equals("Y") ? MaskingUtils.id(custId) : custId;
 	}
 
 	public String getMaskingCustNm() {
-		return TsaSession.getInfo().getMaskingYn().equals("Y") ? MaskingUtils.name(custNm) : custNm;
+		return TsaSession.getInfo().getMaskingYn().equals("Y") ? MaskingUtils.name(getCustNm()) : getCustNm();
 	}
 
 	public String getMaskingCellPhnno() {
@@ -95,7 +100,7 @@ public class Counsel extends TscBaseDomain {
 	}
 
 	public String getMaskingEmail() {
-		return TsaSession.getInfo().getMaskingYn().equals("Y") ? MaskingUtils.email(email) : email;
+		return TsaSession.getInfo().getMaskingYn().equals("Y") ? MaskingUtils.email(getEmail()) : getEmail();
 	}
 
 }

+ 87 - 0
src/main/java/com/style24/persistence/domain/Review.java

@@ -0,0 +1,87 @@
+package com.style24.persistence.domain;
+
+import java.util.Collection;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.style24.admin.support.security.session.TsaSession;
+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;
+
+/**
+ * 상품평 Domain
+ *
+ * @author jsshin
+ * @since 2021. 01. 22
+ */
+@SuppressWarnings("serial")
+@Data
+public class Review extends TscBaseDomain {
+
+	private Integer reviewSq;			// 상품평일련번호
+	private String goodsCd;				// 상품코드
+	private String goodsNm;				// 상품명
+	private String goodsImg;			// 상품이미지
+	private String reviewGb;			// 상품평구분(R:일반상품평, P:포토/영상상품평)
+	private Integer custNo;				// 고객번호
+	private String custNm;				// 고객명
+	private Integer ordNo;				// 주문번호
+	private Integer ordDtlNo;			// 주문상세번호
+	private String reviewTitle;			// 상품평제목
+	private String reviewContent;		// 상품평내용
+	private float score;				// 구매평점
+	private int height;					// 키
+	private int weight;					// 몸무게
+	private String scoreSize;			// 사이즈점수(공통코드G040)
+	private String scoreColor;			// 컬러점수(공통코드G039)
+	private String scoreFit;			// 핏점수(공통코드G042)
+	private String scoreThick;			// 두께감점수(공통코드G079)
+	private String scoreWeight;			// 무게감점수(공통코드G080)
+	private String scoreBall;			// 볼넓이점수(공통코드G041)
+	private int giveDuePnt;				// 지급예정포인트
+	private String pntGiveStat;			// 포인트지급상태(공통코드G043)
+	private String dispYn;				// 표시여부
+	private String delYn;				// 삭제여부
+	private String confirmYn;			// 확인여부
+	private String confirmUno;			// 확인자번호
+	private String confirmUnm;			// 확인자명
+	private String confirmDt;			// 확인일시
+	private String admRpl;				// 관리자댓글
+	private String admRplRegNo;			// 댓글등록자번호
+	private String admRplRegNm;			// 댓글등록자명
+	private String admRplDt;			// 관리자댓글등록일시
+	private String bestYn;				// 베스트상품평여부
+	private String bpntGiveYn;			// 베스트상품평포인트지급여부
+	private int giveDueBpnt;			// 지급예정베스트포인트
+
+	// 상품평 첨부파일
+	private Collection<ReviewAttach> attachList;
+
+	// 검색조건
+	private String startDt;
+	private String endDt;
+	private String searchGb;
+	private String searchTxt;
+	@JsonFormat(with = JsonFormat.Feature.ACCEPT_SINGLE_VALUE_AS_ARRAY)
+	private String[] goodsCds;
+
+	// Pagination
+	private TscPageRequest pageable;
+	private int pageNo = 1;
+	private int pageSize = 50;
+	private int pageUnit = 10;
+
+	// 암호화 대상 복호화 처리
+	public String getCustNm() {
+		this.custNm = CryptoUtils.decryptAES(this.custNm);
+		return this.custNm;
+	}
+
+	public String getMaskingCustNm() {
+		return TsaSession.getInfo().getMaskingYn().equals("Y") ? MaskingUtils.name(getCustNm()) : getCustNm();
+	}
+
+}

+ 27 - 0
src/main/java/com/style24/persistence/domain/ReviewAttach.java

@@ -0,0 +1,27 @@
+package com.style24.persistence.domain;
+
+import com.style24.persistence.TscBaseDomain;
+
+import lombok.Data;
+
+/**
+ * 상품평 첨부파일 Domain
+ *
+ * @author gagamel
+ * @since 2021. 4. 22
+ */
+@SuppressWarnings("serial")
+@Data
+public class ReviewAttach extends TscBaseDomain {
+
+	// 상품평 첨부파일
+	private Integer rvAtcSq;	// 상품평첨부파일일련번호
+	private Integer reviewSq;	// 상품평일련번호
+	private String fileGb;		// 첨부파일종류(M:동영상,I:이미지)
+	private String orgFileNm;	// 원본파일명
+	private String sysFileNm;	// 시스템파일명
+	private String kufKey;		// Kollus업로드파일키
+	private String kmcKey;		// Kollus미디어컨텐츠키
+	private String delYn;		// 삭제여부
+
+}

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

@@ -198,7 +198,7 @@
 		if (event.colDef.field == 'counselSq') {
 			// 상품문의 상세
 			cfnOpenGoodsQnaDetailPopup(event.data.counselSq);
-		} else if (event.colDef.field == 'custNm') {
+		} else if (event.colDef.field == 'maskingCustNm') {
 			// 고객 상세
 			cfnOpenCustDetailPopup(event.data.custNo);
 		} else if (event.colDef.field == 'relGoodsCd') {

+ 3 - 3
src/main/webapp/WEB-INF/views/customer/OneToOneQnaDetailForm.html

@@ -38,7 +38,7 @@
 						<col style="width:15%;"/>
 						<col/>
 <!-- 						<col style="width:10%;"/> -->
-<!-- 						<col style="width:15%;"/> -->
+<!-- 						<col style="width:10%;"/> -->
 						<col style="width:25%;"/>
 					</colgroup>
 					<thead>
@@ -59,10 +59,10 @@
 							<td th:text="*{siteNm}"></td>
 							<td th:utext="*{counselClsfNm}"></td>
 							<td th:text="*{questDt}"></td>
-							<td th:utext="*{custNm + ' / ' + cellPhnno + ' / ' + email}"></td>
+							<td th:utext="*{maskingCustNm + ' / ' + maskingCellPhnno + '<br/>' + maskingEmail}"></td>
 <!-- 							<td th:text="*{relOrdNo}"></td> -->
 <!-- 							<td th:utext="*{ansTransYn == 'Y' ? ansTransDt + '<br/>' + ansCompNm : ''}"></td> -->
-							<td th:utext="*{ansStat == 'G060_20' ? ansStatNm + ' / ' + ansDt + ' / ' + ansNm : ansStatNm}"></td>
+							<td th:utext="*{ansStat == 'G060_20' ? ansStatNm + ' / ' + ansDt + '<br/>' + ansNm : ansStatNm}"></td>
 						</tr>
 					</tbody>
 				</table>

+ 6 - 6
src/main/webapp/WEB-INF/views/customer/OneToOneQnaForm.html

@@ -125,12 +125,12 @@
 		},
 		{headerName: "문의 제목", field: "questTitle", width: 300},
 		{headerName: "고객번호", field: "custNo", width: 100, cellClass: 'text-center', hide: true},
-		{headerName: "고객ID", field: "custId", width: 100, cellClass: 'text-center', hide: true},
+		{headerName: "고객ID", field: "maskingCustId", width: 100, cellClass: 'text-center', hide: true},
 		{
-			headerName: "고객명", field: "custNm", width: 150, cellClass: 'text-center',
-			cellRenderer: function(params) { return '<a href="javascript:void(0);">' + params.value + '(' + params.data.custId + ')</a>'; }
+			headerName: "고객명", field: "maskingCustNm", width: 150, cellClass: 'text-center',
+			cellRenderer: function(params) { return '<a href="javascript:void(0);">' + params.value + '(' + params.data.maskingCustId + ')</a>'; }
 		},
-		{headerName: "휴대전화번호", field: "cellPhnno", width: 120, cellClass: 'text-center'},
+		{headerName: "휴대전화번호", field: "maskingCellPhnno", width: 120, cellClass: 'text-center'},
 		{
 			headerName: "SMS답변요청", field: "smsReqYn", width: 120, cellClass: 'text-center',
 			cellRenderer: function(params) { return params.value == 'Y' ? 'Yes' : 'No'; }
@@ -139,7 +139,7 @@
 			headerName: "SMS답변발송", field: "smsSendYn", width: 120, cellClass: 'text-center',
 			cellRenderer: function(params) { return params.value == 'Y' ? 'Yes' : 'No'; }
 		},
-		{headerName: "이메일", field: "email", width: 200},
+		{headerName: "이메일", field: "maskingEmail", width: 200},
 // 		{
 // 			headerName: "이메일답변요청", field: "emailReqYn", width: 120, cellClass: 'text-center',
 // 			cellRenderer: function(params) { return params.value == 'Y' ? 'Yes' : 'No'; }
@@ -168,7 +168,7 @@
 		if (event.colDef.field == 'counselSq') {
 			// 1:1문의 상세
 			cfnOpenOneToOneQnaDetailPopup(event.data.counselSq);
-		} else if (event.colDef.field == 'custNm') {
+		} else if (event.colDef.field == 'maskingCustNm') {
 			// 고객 상세
 			cfnOpenCustDetailPopup(event.data.custNo);
 		}

+ 5 - 6
src/main/webapp/WEB-INF/views/marketing/ReviewForm.html

@@ -159,9 +159,6 @@
 		{
 			headerName: "주문상품", cellClass: 'text-center',
 			children: [
-				{headerName: '주문번호', field: 'ordNo', width: 90, cellClass: 'text-center', cellRenderer: function(params) { return '<a href="javascript:void(0);">' + params.value + '</a>'; }},
-				{headerName: '주문상세번호', field: 'ordDtlNo', width: 120, cellClass: 'text-center', hide: true},
-				{headerName: "브랜드명", field: "brandKnm", width: 130, cellClass: 'text-center'},
 				{
 					headerName: "이미지", field: "goodsImg", width: 100, height: 60, cellClass: 'text-center',
 					cellRenderer: function(params) {
@@ -172,12 +169,14 @@
 				{headerName: "상품명", field: "goodsNm", width: 240, cellClass: 'text-center'},
 				{headerName: '회원번호', field: 'custNo', width: 100, cellClass: 'text-center', hide: true},
 				{
-					headerName: '주문자명', field: 'custNm', width: 100, cellClass: 'text-center',
+					headerName: '주문자명', field: 'maskingCustNm', width: 100, cellClass: 'text-center',
 					cellRenderer: function(params) {
 						if (gagajf.isNull(params.value)) return '';
 						return '<a href="javascript:void(0);">' + params.value + '</a>';
 					}
-				}
+				},
+				{headerName: '주문번호', field: 'ordNo', width: 90, cellClass: 'text-center', cellRenderer: function(params) { return '<a href="javascript:void(0);">' + params.value + '</a>'; }},
+				{headerName: '주문상세번호', field: 'ordDtlNo', width: 120, cellClass: 'text-center', hide: true}
 			]
 		},
 		{headerName: "상품평 제목", field: "reviewTitle", width: 200, cellClass: 'text-center', hide: true},
@@ -247,7 +246,7 @@
 		} else if (event.colDef.field == 'goodsCd') {
 			// 상품 상세
 			cfnOpenGoodsDetailPopup('U', event.data.goodsCd);
-		} else if (event.colDef.field == 'custNm') {
+		} else if (event.colDef.field == 'maskingCustNm') {
 			// 고객 상세
 			cfnOpenCustDetailPopup(event.data.custNo);
 		}