
+++ src/main/java/com/takensoft/cms/loginPolicy/dao/Email2ndAuthDAO.java
... | ... | @@ -0,0 +1,33 @@ |
1 | +package com.takensoft.cms.loginPolicy.dao; | |
2 | + | |
3 | +import com.takensoft.cms.loginPolicy.vo.Email2ndAuthVO; | |
4 | +import com.takensoft.cms.loginPolicy.vo.LoginModeVO; | |
5 | +import org.egovframe.rte.psl.dataaccess.mapper.Mapper; | |
6 | + | |
7 | +/** | |
8 | + * @author 하석형 | |
9 | + * @since 2025.05.27 | |
10 | + * @modification | |
11 | + * since | author | description | |
12 | + * 2025.05.27 | 하석형 | 최초 등록 | |
13 | + * | |
14 | + * 이메일 2차 인증 관련 DAO | |
15 | + */ | |
16 | +@Mapper("email2ndAuthDAO") | |
17 | +public interface Email2ndAuthDAO { | |
18 | + | |
19 | + /** | |
20 | + * @return String - 이메일 2차 인증 사용 여부 | |
21 | + * | |
22 | + * 이메일 2차 인증 조회 | |
23 | + */ | |
24 | + String findLatestEmail2ndAuth(); | |
25 | + | |
26 | + /** | |
27 | + * @param email2ndAuthVO - 이메일 2차 인증 정보 | |
28 | + * @return int - 이메일 2차 인증 등록 결과 | |
29 | + * | |
30 | + * 이메일 2차 인증 등록 | |
31 | + */ | |
32 | + int save(Email2ndAuthVO email2ndAuthVO); | |
33 | +} |
+++ src/main/java/com/takensoft/cms/loginPolicy/service/Email2ndAuthService.java
... | ... | @@ -0,0 +1,34 @@ |
1 | +package com.takensoft.cms.loginPolicy.service; | |
2 | + | |
3 | +import com.takensoft.cms.loginPolicy.vo.Email2ndAuthVO; | |
4 | +import com.takensoft.cms.loginPolicy.vo.LoginPolicyVO; | |
5 | + | |
6 | +/** | |
7 | + * @author 하석형 | |
8 | + * @since 2025.05.27 | |
9 | + * @modification | |
10 | + * since | author | description | |
11 | + * 2025.05.27 | 하석형 | 최초 등록 | |
12 | + * | |
13 | + * 이메일 2차 인증 관련 인터페이스 | |
14 | + */ | |
15 | +public interface Email2ndAuthService { | |
16 | + | |
17 | + /** | |
18 | + * | |
19 | + * @return boolean - 이메일 2차 인증 사용 여부 조회 | |
20 | + * | |
21 | + * 이메일 2차 인증 조회 | |
22 | + */ | |
23 | + public boolean findByEmail2ndAuth(); | |
24 | + | |
25 | + /** | |
26 | + * @param email2ndAuthVO - 이메일 2차 인증 정보 | |
27 | + * @return int - 이메일 2차 인증 등록 결과 | |
28 | + * | |
29 | + * 이메일 2차 인증 등록 | |
30 | + */ | |
31 | + public int email2ndAuthSave(Email2ndAuthVO email2ndAuthVO); | |
32 | + | |
33 | + | |
34 | +}(파일 끝에 줄바꿈 문자 없음) |
+++ src/main/java/com/takensoft/cms/loginPolicy/service/impl/Email2ndAuthServiceImpl.java
... | ... | @@ -0,0 +1,95 @@ |
1 | +package com.takensoft.cms.loginPolicy.service.impl; | |
2 | + | |
3 | +import com.takensoft.cms.loginPolicy.dao.Email2ndAuthDAO; | |
4 | +import com.takensoft.cms.loginPolicy.dao.LoginPolicyDAO; | |
5 | +import com.takensoft.cms.loginPolicy.service.Email2ndAuthService; | |
6 | +import com.takensoft.cms.loginPolicy.service.LoginPolicyService; | |
7 | +import com.takensoft.cms.loginPolicy.vo.Email2ndAuthVO; | |
8 | +import com.takensoft.cms.loginPolicy.vo.LoginPolicyVO; | |
9 | +import com.takensoft.common.exception.CustomInsertFailException; | |
10 | +import com.takensoft.common.exception.CustomNotFoundException; | |
11 | +import com.takensoft.common.idgen.service.IdgenService; | |
12 | +import com.takensoft.common.service.VerificationService; | |
13 | +import lombok.RequiredArgsConstructor; | |
14 | +import org.egovframe.rte.fdl.cmmn.EgovAbstractServiceImpl; | |
15 | +import org.springframework.dao.DataAccessException; | |
16 | +import org.springframework.stereotype.Service; | |
17 | + | |
18 | +/** | |
19 | + * @author 하석형 | |
20 | + * @since 2025.05.27 | |
21 | + * @modification | |
22 | + * since | author | description | |
23 | + * 2025.05.27 | 하석형 | 최초 등록 | |
24 | + * | |
25 | + * EgovAbstractServiceImpl : 전자정부 상속 | |
26 | + * Email2ndAuthService : 이메일 2차 인증 관련 인터페이스 상속 | |
27 | + * | |
28 | + * 이메일 2차 인증 관련 인터페이스 구현체 | |
29 | + */ | |
30 | +@Service("email2ndAuthService") | |
31 | +@RequiredArgsConstructor | |
32 | +public class Email2ndAuthServiceImpl extends EgovAbstractServiceImpl implements Email2ndAuthService { | |
33 | + | |
34 | + private final Email2ndAuthDAO email2ndAuthDAO; | |
35 | + private final IdgenService eml2ndAuthIdgn; | |
36 | + private final VerificationService verificationService; | |
37 | + | |
38 | + /** | |
39 | + * @return Boolean - 이메일 2차 인증 사용 여부 | |
40 | + * @throws DataAccessException - db 관련 예외 발생 시 | |
41 | + * @throws Exception - 그 외 예외 발생 시 | |
42 | + * | |
43 | + * 이메일 2차 인증 조회 | |
44 | + */ | |
45 | + @Override | |
46 | + public boolean findByEmail2ndAuth() { | |
47 | + try { | |
48 | + String useEmail2ndAuth = email2ndAuthDAO.findLatestEmail2ndAuth(); | |
49 | + | |
50 | + if (useEmail2ndAuth.equals("Y")) { | |
51 | + return true; | |
52 | + } else { | |
53 | + return false; | |
54 | + } | |
55 | + } catch (DataAccessException dae) { | |
56 | + throw dae; | |
57 | + } catch (Exception e) { | |
58 | + throw e; | |
59 | + } | |
60 | + } | |
61 | + | |
62 | + /** | |
63 | + * @param email2ndAuthVO - 이메일 2차 인증 정보 | |
64 | + * @return int - 이메일 2차 인증 등록 결과 | |
65 | + * @throws CustomInsertFailException - 이메일 2차 인증 등록 예외 발생 시 | |
66 | + * @throws DataAccessException - db 관련 예외 발생 시 | |
67 | + * @throws Exception - 그 외 예외 발생 시 | |
68 | + * | |
69 | + * 이메일 2차 인증 등록 | |
70 | + */ | |
71 | + @Override | |
72 | + public int email2ndAuthSave(Email2ndAuthVO email2ndAuthVO) { | |
73 | + try { | |
74 | + // 등록된 토큰에서 사용자 정보 조회 | |
75 | + String writer = verificationService.getCurrentUserId(); | |
76 | + if (writer == null || writer.isEmpty()) { | |
77 | + throw new CustomNotFoundException("사용자 정보 조회에 실패했습니다."); | |
78 | + } | |
79 | + email2ndAuthVO.setRgtr(writer); | |
80 | + | |
81 | + email2ndAuthVO.setEml2ndAuthId(eml2ndAuthIdgn.getNextStringId()); // ID 자동 생성 | |
82 | + int result = email2ndAuthDAO.save(email2ndAuthVO); | |
83 | + if(result == 0) { | |
84 | + throw new CustomInsertFailException("이메일 2차 인증 등록에 실패했습니다."); | |
85 | + } | |
86 | + | |
87 | + return result; | |
88 | + } catch (DataAccessException dae) { | |
89 | + throw dae; | |
90 | + } catch (Exception e) { | |
91 | + throw e; | |
92 | + } | |
93 | + } | |
94 | + | |
95 | +}(파일 끝에 줄바꿈 문자 없음) |
+++ src/main/java/com/takensoft/cms/loginPolicy/vo/Email2ndAuthVO.java
... | ... | @@ -0,0 +1,27 @@ |
1 | +package com.takensoft.cms.loginPolicy.vo; | |
2 | + | |
3 | +import lombok.AllArgsConstructor; | |
4 | +import lombok.Getter; | |
5 | +import lombok.NoArgsConstructor; | |
6 | +import lombok.Setter; | |
7 | + | |
8 | +/** | |
9 | + * @author 하석형 | |
10 | + * @since 2025.05.27 | |
11 | + * @modification | |
12 | + * since | author | description | |
13 | + * 2025.05.27 | 하석형 | 최초 등록 | |
14 | + * | |
15 | + * 이메일 2차 인증 관련 VO | |
16 | + */ | |
17 | +@Getter | |
18 | +@Setter | |
19 | +@NoArgsConstructor | |
20 | +@AllArgsConstructor | |
21 | +public class Email2ndAuthVO { | |
22 | + | |
23 | + private String eml2ndAuthId; // 이메일 2차 인증 ID | |
24 | + private String useYn; // 사용 여부 | |
25 | + private String rgtr; // 등록자 ID | |
26 | + private String regDt; // 등록일시 | |
27 | +}(파일 끝에 줄바꿈 문자 없음) |
--- src/main/java/com/takensoft/cms/loginPolicy/web/LoginPolicyController.java
+++ src/main/java/com/takensoft/cms/loginPolicy/web/LoginPolicyController.java
... | ... | @@ -1,7 +1,9 @@ |
1 | 1 |
package com.takensoft.cms.loginPolicy.web; |
2 | 2 |
|
3 |
+import com.takensoft.cms.loginPolicy.service.Email2ndAuthService; |
|
3 | 4 |
import com.takensoft.cms.loginPolicy.service.LoginModeService; |
4 | 5 |
import com.takensoft.cms.loginPolicy.service.LoginPolicyService; |
6 |
+import com.takensoft.cms.loginPolicy.vo.Email2ndAuthVO; |
|
5 | 7 |
import com.takensoft.cms.loginPolicy.vo.LoginModeVO; |
6 | 8 |
import com.takensoft.cms.loginPolicy.vo.LoginPolicyVO; |
7 | 9 |
import com.takensoft.cms.mber.vo.MberVO; |
... | ... | @@ -10,6 +12,7 @@ |
10 | 12 |
import com.takensoft.common.util.JWTUtil; |
11 | 13 |
import com.takensoft.common.util.ResponseUtil; |
12 | 14 |
import com.takensoft.common.util.SessionUtil; |
15 |
+import com.takensoft.common.verify.vo.EmailVO; |
|
13 | 16 |
import jakarta.servlet.http.HttpServletRequest; |
14 | 17 |
import lombok.RequiredArgsConstructor; |
15 | 18 |
import lombok.extern.slf4j.Slf4j; |
... | ... | @@ -29,6 +32,7 @@ |
29 | 32 |
* @modification |
30 | 33 |
* since | author | description |
31 | 34 |
* 2025.03.22 | 김혜민 | 최초 등록 |
35 |
+ * 2025.05.27 | 하석형 | findByEmail2ndAuth, saveEmail2ndAuth 추가 |
|
32 | 36 |
* |
33 | 37 |
* 로그인정책 관련 컨트롤러 |
34 | 38 |
*/ |
... | ... | @@ -45,6 +49,7 @@ |
45 | 49 |
private final SessionUtil sessionUtil; |
46 | 50 |
private final RedisTemplate<String, String> redisTemplate; |
47 | 51 |
private final RefreshTokenService refreshTokenService; |
52 |
+ private final Email2ndAuthService email2ndAuth; |
|
48 | 53 |
|
49 | 54 |
/** |
50 | 55 |
* |
... | ... | @@ -159,4 +164,29 @@ |
159 | 164 |
} |
160 | 165 |
} |
161 | 166 |
|
167 |
+ /** |
|
168 |
+ * @return ResponseEntity - 이메일 2차 인증 조회 결과를 포함하는 응답 |
|
169 |
+ * |
|
170 |
+ * 이메일 2차 인증 조회 |
|
171 |
+ */ |
|
172 |
+ @PostMapping("/findByEmail2ndAuth.json") |
|
173 |
+ public ResponseEntity<?> findByEmail2ndAuth() { |
|
174 |
+ boolean result = email2ndAuth.findByEmail2ndAuth(); |
|
175 |
+ |
|
176 |
+ return resUtil.successRes(result, MessageCode.COMMON_SUCCESS); |
|
177 |
+ } |
|
178 |
+ |
|
179 |
+ /** |
|
180 |
+ * @param email2ndAuthVO - 이메일 2차 인증 정보 |
|
181 |
+ * @return ResponseEntity - 이메일 2차 인증 등록 결과를 포함하는 응답 |
|
182 |
+ * |
|
183 |
+ * 이메일 2차 인증 등록 |
|
184 |
+ */ |
|
185 |
+ @PostMapping("/saveEmail2ndAuth.json") |
|
186 |
+ public ResponseEntity<?> saveEmail2ndAuth(@RequestBody Email2ndAuthVO email2ndAuthVO) { |
|
187 |
+ int result = email2ndAuth.email2ndAuthSave(email2ndAuthVO); |
|
188 |
+ |
|
189 |
+ return resUtil.successRes(result, MessageCode.COMMON_SUCCESS); |
|
190 |
+ } |
|
191 |
+ |
|
162 | 192 |
} |
--- src/main/java/com/takensoft/common/config/SecurityConfig.java
+++ src/main/java/com/takensoft/common/config/SecurityConfig.java
... | ... | @@ -2,6 +2,7 @@ |
2 | 2 |
|
3 | 3 |
import com.takensoft.cms.accesCtrl.service.AccesCtrlService; |
4 | 4 |
import com.takensoft.cms.cntxtPth.service.CntxtPthService; |
5 |
+import com.takensoft.cms.loginPolicy.service.Email2ndAuthService; |
|
5 | 6 |
import com.takensoft.cms.loginPolicy.service.LoginModeService; |
6 | 7 |
import com.takensoft.cms.loginPolicy.service.LoginPolicyService; |
7 | 8 |
import com.takensoft.common.filter.*; |
... | ... | @@ -62,6 +63,7 @@ |
62 | 63 |
private final LoginPolicyService loginPolicyService; |
63 | 64 |
private final EmailServiceImpl emailServiceImpl; |
64 | 65 |
private final LoginUtil loginUtil; |
66 |
+ private final Email2ndAuthService email2ndAuth; |
|
65 | 67 |
|
66 | 68 |
@Autowired |
67 | 69 |
private CustomOAuth2UserServiceImpl customOAuth2UserServiceImpl; |
... | ... | @@ -80,7 +82,7 @@ |
80 | 82 |
* SecurityConfig 생성자 |
81 | 83 |
*/ |
82 | 84 |
public SecurityConfig(AuthenticationConfiguration authenticationConfiguration, JWTUtil jwtUtil, CntxtPthService cntxtPthService, AccesCtrlService accesCtrlService, AppConfig appConfig, CustomAuthenticationEntryPoint authenticationEntryPoint, CustomAccessDenieHandler accessDenieHandler, |
83 |
- HttpRequestUtil httpRequestUtil, LoginModeService loginModeService, LoginPolicyService loginPolicyService, EmailServiceImpl emailServiceImpl, @Value("${front.url}") String fUrl, RedisTemplate<String, String> redisTemplate, LoginUtil loginUtil) { |
|
85 |
+ HttpRequestUtil httpRequestUtil, LoginModeService loginModeService, LoginPolicyService loginPolicyService, EmailServiceImpl emailServiceImpl, @Value("${front.url}") String fUrl, RedisTemplate<String, String> redisTemplate, LoginUtil loginUtil, Email2ndAuthService email2ndAuth) { |
|
84 | 86 |
this.authenticationConfiguration = authenticationConfiguration; |
85 | 87 |
this.cntxtPthService = cntxtPthService; |
86 | 88 |
this.accesCtrlService = accesCtrlService; |
... | ... | @@ -91,10 +93,11 @@ |
91 | 93 |
this.appConfig = appConfig; |
92 | 94 |
this.loginModeService = loginModeService; |
93 | 95 |
this.loginPolicyService = loginPolicyService; |
94 |
- this.emailServiceImpl = emailServiceImpl; |
|
95 | 96 |
this.FRONT_URL = fUrl; |
96 | 97 |
this.redisTemplate = redisTemplate; |
98 |
+ this.emailServiceImpl = emailServiceImpl; |
|
97 | 99 |
this.loginUtil = loginUtil; |
100 |
+ this.email2ndAuth = email2ndAuth; |
|
98 | 101 |
} |
99 | 102 |
|
100 | 103 |
/** |
... | ... | @@ -189,7 +192,7 @@ |
189 | 192 |
http.addFilterBefore(new AccesFilter(accesCtrlService, httpRequestUtil, appConfig), JWTFilter.class); |
190 | 193 |
|
191 | 194 |
// 로그인 필터 |
192 |
- http.addFilterAt(new LoginFilter(authenticationManager(authenticationConfiguration), emailServiceImpl, loginUtil), UsernamePasswordAuthenticationFilter.class); |
|
195 |
+ http.addFilterAt(new LoginFilter(authenticationManager(authenticationConfiguration), emailServiceImpl, loginUtil, email2ndAuth), UsernamePasswordAuthenticationFilter.class); |
|
193 | 196 |
|
194 | 197 |
|
195 | 198 |
return http.build(); |
--- src/main/java/com/takensoft/common/filter/LoginFilter.java
+++ src/main/java/com/takensoft/common/filter/LoginFilter.java
... | ... | @@ -1,6 +1,7 @@ |
1 | 1 |
package com.takensoft.common.filter; |
2 | 2 |
|
3 | 3 |
import com.fasterxml.jackson.databind.ObjectMapper; |
4 |
+import com.takensoft.cms.loginPolicy.service.Email2ndAuthService; |
|
4 | 5 |
import com.takensoft.cms.mber.dto.LoginDTO; |
5 | 6 |
import com.takensoft.cms.mber.vo.MberVO; |
6 | 7 |
import com.takensoft.common.exception.FilterExceptionHandler; |
... | ... | @@ -40,13 +41,15 @@ |
40 | 41 |
private final AuthenticationManager authenticationManager; |
41 | 42 |
private final EmailServiceImpl emailServiceImpl; |
42 | 43 |
private final LoginUtil loginUtil; |
44 |
+ private final Email2ndAuthService email2ndAuth; |
|
43 | 45 |
/** |
44 | 46 |
* LoginFilter 생성자 |
45 | 47 |
*/ |
46 |
- public LoginFilter(AuthenticationManager authenticationManager, EmailServiceImpl emailServiceImpl, LoginUtil loginUtil) { |
|
48 |
+ public LoginFilter(AuthenticationManager authenticationManager, EmailServiceImpl emailServiceImpl, LoginUtil loginUtil, Email2ndAuthService email2ndAuth) { |
|
47 | 49 |
this.authenticationManager = authenticationManager; |
48 | 50 |
this.emailServiceImpl = emailServiceImpl; |
49 | 51 |
this.loginUtil = loginUtil; |
52 |
+ this.email2ndAuth = email2ndAuth; |
|
50 | 53 |
|
51 | 54 |
this.setRequiresAuthenticationRequestMatcher(new AntPathRequestMatcher("/mbr/loginProc.json","POST")); |
52 | 55 |
} |
... | ... | @@ -94,22 +97,27 @@ |
94 | 97 |
MberVO mber = (MberVO) authentication.getPrincipal(); |
95 | 98 |
boolean isAdmin = mber.getAuthorities().stream().anyMatch(role -> role.getAuthority().equals("ROLE_ADMIN")); // 관리자 권한 여부 |
96 | 99 |
String lgnReqPage = (String) req.getAttribute("lgnReqPage"); // 로그인 요청 페이지 정보 (A: 관리자, U: 사용자) |
100 |
+ boolean use2ndAuth = email2ndAuth.findByEmail2ndAuth(); // 이메일 2차 인증 여부 확인 |
|
97 | 101 |
|
98 | 102 |
// 관리자일 경우 2차 인증(이메일 인증) 코드 발송 |
99 | 103 |
if(isAdmin) { |
100 |
- EmailVO emailVO = new EmailVO().builder() |
|
101 |
- .email(mber.getEml()) |
|
102 |
- .build(); |
|
103 |
- emailServiceImpl.sendEmailVerifyCode(emailVO); |
|
104 |
- res.setContentType("application/json;charset=UTF-8"); |
|
105 |
- res.setStatus(HttpStatus.OK.value()); |
|
106 |
- result.put("mbrId", mber.getMbrId()); |
|
107 |
- result.put("email", mber.getEml()); |
|
104 |
+ if(use2ndAuth) { |
|
105 |
+ EmailVO emailVO = new EmailVO().builder() |
|
106 |
+ .email(mber.getEml()) |
|
107 |
+ .build(); |
|
108 |
+ emailServiceImpl.sendEmailVerifyCode(emailVO); |
|
109 |
+ res.setContentType("application/json;charset=UTF-8"); |
|
110 |
+ res.setStatus(HttpStatus.OK.value()); |
|
111 |
+ result.put("mbrId", mber.getMbrId()); |
|
112 |
+ result.put("email", mber.getEml()); |
|
108 | 113 |
|
109 |
- res.setContentType("application/json;charset=UTF-8"); |
|
110 |
- res.setStatus(HttpStatus.OK.value()); |
|
114 |
+ res.setContentType("application/json;charset=UTF-8"); |
|
115 |
+ res.setStatus(HttpStatus.OK.value()); |
|
111 | 116 |
|
112 |
- new ObjectMapper().writeValue(res.getOutputStream(), result); |
|
117 |
+ new ObjectMapper().writeValue(res.getOutputStream(), result); |
|
118 |
+ } else { |
|
119 |
+ loginUtil.successLogin(mber, req, res); // 로그인 성공 처리 |
|
120 |
+ } |
|
113 | 121 |
// 사용자일 경우 |
114 | 122 |
} else { |
115 | 123 |
// 사용자가 관리자 로그인 페이지로 접근할 경우 |
--- src/main/java/com/takensoft/common/idgen/context/ContextIdgen.java
+++ src/main/java/com/takensoft/common/idgen/context/ContextIdgen.java
... | ... | @@ -181,7 +181,7 @@ |
181 | 181 |
|
182 | 182 |
// 컨텍스트 패스 관리 |
183 | 183 |
@Bean(name = "cntxtPthIdgn") |
184 |
- public IdgenService cntxtPthIdgnIdgen() { |
|
184 |
+ public IdgenService cntxtPthIdgn() { |
|
185 | 185 |
IdgenService idgenServiceImpl = new IdgenService(); |
186 | 186 |
idgenServiceImpl.setCipers(15); |
187 | 187 |
idgenServiceImpl.setFillChar('0'); |
... | ... | @@ -189,4 +189,15 @@ |
189 | 189 |
idgenServiceImpl.setTblNm("CNTXT_PTH_ID"); |
190 | 190 |
return idgenServiceImpl; |
191 | 191 |
} |
192 |
+ |
|
193 |
+ // 이메일 2차 인증 관리 |
|
194 |
+ @Bean(name = "eml2ndAuthIdgn") |
|
195 |
+ public IdgenService eml2ndAuthIdgn() { |
|
196 |
+ IdgenService idgenServiceImpl = new IdgenService(); |
|
197 |
+ idgenServiceImpl.setCipers(15); |
|
198 |
+ idgenServiceImpl.setFillChar('0'); |
|
199 |
+ idgenServiceImpl.setPrefix("EML_2ND_AUTH_"); |
|
200 |
+ idgenServiceImpl.setTblNm("EML_2ND_AUTH_ID"); |
|
201 |
+ return idgenServiceImpl; |
|
202 |
+ } |
|
192 | 203 |
}(파일 끝에 줄바꿈 문자 없음) |
+++ src/main/resources/mybatis/mapper/loginPolicy/email2ndAuth-SQL.xml
... | ... | @@ -0,0 +1,42 @@ |
1 | +<?xml version="1.0" encoding="UTF-8"?> | |
2 | +<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | |
3 | +<!-- | |
4 | + 작성자 : 하석형 | |
5 | + 작성일 : 2025.05.27 | |
6 | + 내 용 : 이메일 2차 인증 관련 | |
7 | +--> | |
8 | +<mapper namespace="com.takensoft.cms.loginPolicy.dao.Email2ndAuthDAO"> | |
9 | + | |
10 | + <!-- | |
11 | + 작성자 : 하석형 | |
12 | + 작성일 : 2025.05.27 | |
13 | + 내 용 : 이메일 2차 인증 사용 여부 최신값 조회 | |
14 | + --> | |
15 | + <select id="findLatestEmail2ndAuth" resultType="String"> | |
16 | + SELECT use_yn | |
17 | + FROM eml_2nd_auth_hstry | |
18 | + ORDER BY reg_dt DESC | |
19 | + LIMIT 1 | |
20 | + </select> | |
21 | + | |
22 | + <!-- | |
23 | + 작성자 : 하석형 | |
24 | + 작성일 : 2025.05.27 | |
25 | + 내 용 : 이메일 2차 인증 등록 | |
26 | + --> | |
27 | + <insert id="save" parameterType="Email2ndAuthVO"> | |
28 | + INSERT INTO eml_2nd_auth_hstry ( | |
29 | + eml_2nd_auth_id, | |
30 | + use_yn, | |
31 | + rgtr, | |
32 | + reg_dt | |
33 | + ) | |
34 | + VALUES ( | |
35 | + #{eml2ndAuthId}, | |
36 | + #{useYn}, | |
37 | + #{rgtr}, | |
38 | + NOW() | |
39 | + ) | |
40 | + </insert> | |
41 | + | |
42 | +</mapper>(파일 끝에 줄바꿈 문자 없음) |
Add a comment
Delete comment
Once you delete this comment, you won't be able to recover it. Are you sure you want to delete this comment?