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

일반회원로그인, 휴면회원 해제 처리 작업중

jsh77b@naver.com 4 лет назад
Родитель
Сommit
71b60101fa

+ 9 - 0
src/main/java/com/style24/front/biz/dao/TsfCustomerDao.java

@@ -38,6 +38,15 @@ public interface TsfCustomerDao {
 	 * @since 2021. 02. 18
 	 */
 	Customer getCustomerInfo(Customer customer);
+	
+	/**
+	 * 활동, 탈퇴, 휴면 테이블 조회
+	 * @param customer - ci, 휴대폰
+	 * @return 임시비밀번호
+	 * @author jsshin
+	 * @since 2021. 02. 18
+	 */
+	Customer getCustomerInfoCI(Customer customer);
 
 	/**
 	 * 고객 데이터 생성

+ 12 - 5
src/main/java/com/style24/front/biz/service/TsfCustomerService.java

@@ -233,8 +233,10 @@ public class TsfCustomerService {
 		customer.setCi(ci);
 		customer.setSiteCd(TscConstants.Site.STYLE24.value());
 		customer.encryptData();
-
-		return customerDao.getCustomerInfo(customer);
+		
+		// 2022.01.10 본인인증시 휴면회원, 탈퇴회원은 CI 중복체크 안함
+		//return customerDao.getCustomerInfo(customer);
+		return customerDao.getCustomerInfoCI(customer);
 	}
 
 	/**
@@ -707,9 +709,14 @@ public class TsfCustomerService {
 		Customer custInfo = getDormantCustomerFindByCustNo(customer.getCustNo());
 
 		if (!customer.getCi().equals(custInfo.getCi())) {
-			result.setBoolean("isRelase", false);
-			result.setString("errorType", "DIFFERENT_CI"); // 계정이 등록된 CI랑 인증한 CI가 다를떄
-			return result;
+			// 2022.01.10 TB_CUSTOMER.CI 값이 없을때 TB_CUSTOMER CI UPDATE 
+			if (StringUtils.isBlank(custInfo.getCi())) {
+				// CI가 없으면 로그인시 본인인증을 한번더 하게끔 처리 로직으로 변경
+			} else {
+				result.setBoolean("isRelase", false);
+				result.setString("errorType", "DIFFERENT_CI"); // 계정이 등록된 CI랑 인증한 CI가 다를떄
+				return result;
+			}
 		}
 
 		customer.setRegNo(customer.getCustNo());

+ 9 - 5
src/main/java/com/style24/front/support/security/TsfAuthenticationProvider.java

@@ -111,12 +111,16 @@ public class TsfAuthenticationProvider implements AuthenticationProvider {
 		if (TscConstants.CustStat.SECEDE.value().equals(loginInfo.getCustStat())) {
 			throw new TsfSecedeAccountException(message.getMessage("LOGN_0007"));
 		}
+		
 		// 활동회원 중 본인인증이 필요한 회원
-//		2021.10.26 김유중 : ci 없는 회원이 본인 인증 시 실패가 많아서 로그인 처리로 변경(정지혜과장,전석훈차장 협의)
-//		if (TscConstants.CustStat.ACTIVE.value().equals(loginInfo.getCustStat()) && StringUtils.isBlank(loginInfo.getCi())) {
-//			TsfSession.setAttribute("custNo", String.valueOf(loginInfo.getCustNo()));
-//			throw new TsfNonCertificationAccountException(message.getMessage("LOGN_0009"));
-//		}
+		// 2021.10.26 김유중 : ci 없는 회원이 본인 인증 시 실패가 많아서 로그인 처리로 변경(정지혜과장,전석훈차장 협의)
+		if (TscConstants.CustStat.ACTIVE.value().equals(loginInfo.getCustStat()) && StringUtils.isBlank(loginInfo.getCi())) {
+			
+			log.info("loginInfo.getCustNo()) ::: {}", loginInfo.getCustNo());
+			
+			TsfSession.setAttribute("custNo", String.valueOf(loginInfo.getCustNo()));
+			throw new TsfNonCertificationAccountException(message.getMessage("LOGN_0009"));
+		}
 
 		// 권한 설정
 		List<SimpleGrantedAuthority> authorities = new ArrayList<>();

+ 29 - 0
src/main/java/com/style24/persistence/mybatis/shop/TsfCustomer.xml

@@ -163,6 +163,35 @@
 		      </if>
 		     ) A
 	</select>
+	
+	<!-- 활동, 탈퇴, 휴면 테이블 조회(2022.01.10 본인인증시 휴면회원, 탈퇴회원은 CI 중복체크 안함) -->
+	<select id="getCustomerInfoCI" parameterType="Customer" resultType="Customer">
+		/* TsfCustomer.getCustomerInfoCI */
+		SELECT A.CUST_NO
+		     , A.CUST_ID
+		     , A.EMAIL
+		     , A.CELL_PHNNO
+		     , A.CUST_STAT
+		     , A.JOIN_DT
+		     , A.SECEDE_DT
+		     , A.DORMANT_DT
+		FROM (
+		      SELECT CUST_NO
+		           , CUST_ID
+		           , EMAIL
+		           , CELL_PHNNO
+		           , CUST_STAT
+		           , DATE_FORMAT(JOIN_DT, '%Y%m%d%H%i%S')   AS JOIN_DT
+		           , ''                                     AS SECEDE_DT
+		           , ''                                     AS DORMANT_DT
+		      FROM   TB_CUSTOMER
+		      WHERE  CUST_STAT = 'G104_10'   /* 활동회원*/
+		      AND    SITE_CD = #{siteCd}
+		     <if test="ci != null and ci != ''">
+		      AND    CI = #{ci}
+		     </if>
+		     ) A
+	</select>
 
 	<!--고객정보 생성-->
 	<insert id="createCustomer" parameterType="Customer" keyProperty="custNo">