jsshin 5 jaren geleden
bovenliggende
commit
a0c470f146

+ 1 - 1
src/main/java/com/style24/admin/biz/dao/TsaCustomerDao.java

@@ -227,6 +227,6 @@ public interface TsaCustomerDao {
 
 	void createException();
 
-
+	void updateCutomerEncodeData(Customer customer);
 
 }

+ 5 - 4
src/main/java/com/style24/admin/biz/service/TsaCustomerService.java

@@ -92,18 +92,19 @@ public class TsaCustomerService {
 		customer.setRegNo(userNo);
 		customer.setUpdNo(userNo);
 		customer.encryptData();  // 암호화 처리
-		// 고객 이력 생성
+		// 1.고객 이력 생성
 		coreCustomerService.createCustomerHistory(customer);
 
-		// 마케팅수신동의 이력 화면단에서 수신 변경이 없으면 ''처리
+		// 2.마케팅수신동의 이력 화면단에서 수신 변경이 없으면 ''처리
 		if (StringUtils.isNotBlank(customer.getSmsAgreeYn())
 				|| StringUtils.isNotBlank(customer.getEmailAgreeYn())
 				|| StringUtils.isNotBlank(customer.getAppAgreeYn())) {
 			coreCustomerService.createCustomerMarketHst(customer);
 		}
-
-		// 정보 수정
+		// 3.고객정보 수정
 		customerDao.updateCustomerInfo(customer);
+		// 임시 암호화
+		//customerDao.updateCutomerEncodeData(customer);
 	}
 
 	/**

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

@@ -463,7 +463,7 @@
 		               FROM   TB_CUST_POINT
 		               WHERE  CUST_NO = C.CUST_NO
 		               AND    EXP_CMP_DT IS NULL
-		               AND    EXP_BE_DT > NOW()
+		               /*AND    EXP_BE_DT > NOW()*/
 		               ), 0)                           AS RM_PNT_AMT -- 가용포인트
 		     , IFNULL((
 		               SELECT SUM(GV_PNT_AMT)
@@ -479,7 +479,7 @@
 		               SELECT SUM(RM_PNT_AMT)
 		               FROM   TB_CUST_POINT
 		               WHERE  CUST_NO = C.CUST_NO
-		               AND    (EXP_CMP_DT IS NOT NULL OR EXP_BE_DT <![CDATA[<]]> NOW())
+		               AND    EXP_CMP_DT IS NOT NULL
 		               ), 0)                           AS EXPIRE_PNT_AMT -- 소멸포인트
 		     , IFNULL((
 		               SELECT SUM(A.PNT_AMT + B.PNT_AMT) AS PNT_AMT
@@ -494,9 +494,9 @@
 		                 , (
 		                    SELECT SUM(PNT_AMT) AS PNT_AMT
 		                         , ORD_NO
-		                    FROM TB_CUST_POINT_HST
-		                    WHERE OCCUR_GB = 'G069_13' -- 적립예정취소
-		                    AND   CUST_NO = #{custNo}
+		                    FROM   TB_CUST_POINT_HST
+		                    WHERE  OCCUR_GB = 'G069_13' -- 적립예정취소
+		                    AND    CUST_NO = #{custNo}
 		                    GROUP BY ORD_NO
 		                    ) B
 		               WHERE A.ORD_NO = B.ORD_NO
@@ -987,4 +987,16 @@
 		VALUES (NULL)
 	</insert>
 
+	<update id="updateCutomerEncodeData" parameterType="Customer">
+		UPDATE TB_CUSTOMER
+		SET    CUST_NM = #{encodedCustNm}
+		     , SEX_GB = #{encodedSexGb}
+		     , EMAIL = #{encodedEmail}
+		     , CELL_PHNNO = #{encodedCellPhnno}
+		     , BIRTH_YMD = #{encodedBirthYmd}
+		     , HOME_BASE_ADDR = #{encodedHomeBaseAddr}
+		     , HOME_DTL_ADDR = #{encodedHomeDtlAddr}
+		WHERE  CUST_NO = #{custNo}
+	</update>
+
 </mapper>

+ 7 - 0
src/main/webapp/WEB-INF/views/customer/CustomerDetailForm.html

@@ -1012,6 +1012,13 @@
 		}
 		customer.birthYmd = customer.birthYmd.replaceAll('-', '');
 
+		// customer.sexGb = orgData.sexGb;
+		// customer.cellPhnno = orgData.cellPhnno;
+		// customer.email = orgData.email;
+		// customer.custNm = orgData.custNm;
+		// customer.homeBaseAddr = orgData.homeBaseAddr;
+		// customer.homeDtlAddr = orgData.homeDtlAddr;
+
 		mcxDialog.confirm("기본정보를 수정 하시겠습니까?", {
 			cancelBtnText: "취소",
 			sureBtnText: "확인",