이준호 전자조정시스템 고도화 커밋
- OTP 인증 개발 중
This commit is contained in:
parent
3d45169028
commit
b69f9870de
@ -1,72 +0,0 @@
|
|||||||
package kcc.kccadr.kccadrCom.web;
|
|
||||||
|
|
||||||
import kcc.com.cmm.LoginVO;
|
|
||||||
import kcc.kccadr.adjreqmgr.service.AdjReqMgrVO;
|
|
||||||
|
|
||||||
public class OtpCertUtil {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @Method Name : otpCert
|
|
||||||
* @작성일 : 2022. 10. 12.
|
|
||||||
* @작성자 : 이준호
|
|
||||||
* @Method 설명 : OTP 문자인증 시 인증번호 검증
|
|
||||||
*/
|
|
||||||
public String otpCert(LoginVO loginVO_P, LoginVO loginVO_R) throws Exception{
|
|
||||||
try {
|
|
||||||
|
|
||||||
/*
|
|
||||||
* select 조건
|
|
||||||
* loginVO_P - certNum
|
|
||||||
* loginVO_P - phone
|
|
||||||
* loginVO_R - uniqId
|
|
||||||
* smsSendTypeCd = '001' (OTP인증번호 발송)
|
|
||||||
* limit 1
|
|
||||||
*
|
|
||||||
* */
|
|
||||||
|
|
||||||
AdjReqMgrVO adjReqMgrVO = new AdjReqMgrVO();
|
|
||||||
|
|
||||||
adjReqMgrVO.setCertNum(loginVO_P.getCertNum());
|
|
||||||
adjReqMgrVO.setPhone(loginVO_P.getPhone());
|
|
||||||
adjReqMgrVO.setFrstRegisterId(loginVO_R.getUniqId());
|
|
||||||
adjReqMgrVO.setSmsSendTypeCd("001");
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// // 인증번호 가져오기
|
|
||||||
// sendLogVO = mjonMsgDataService.selectSysMsgLog(sendLogVO);
|
|
||||||
// if (sendLogVO == null) {
|
|
||||||
// return "empty";
|
|
||||||
// } else {
|
|
||||||
// // 시간 비교
|
|
||||||
// SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
|
||||||
// Date nowdate = new Date();
|
|
||||||
// Date compareDate = format.parse(sendLogVO.getFrstSendPnttm());
|
|
||||||
//
|
|
||||||
// Calendar cal = Calendar.getInstance();
|
|
||||||
// cal.setTime(compareDate);
|
|
||||||
// // 5분 추가
|
|
||||||
// cal.add(Calendar.MINUTE, +5);
|
|
||||||
//
|
|
||||||
// compareDate = cal.getTime();
|
|
||||||
//
|
|
||||||
// // 인증번호을 발송한지 5분 이내일때
|
|
||||||
// if (compareDate.after(nowdate)) {
|
|
||||||
// UserManageVO checkUser = userManageService.selectAdminUserSmsCertCheck(userManageVO);
|
|
||||||
//
|
|
||||||
// if (checkUser != null) {
|
|
||||||
// return "success";
|
|
||||||
// } else {
|
|
||||||
// return "checkNoFail";
|
|
||||||
// }
|
|
||||||
// } else {
|
|
||||||
// return "timeOut";
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
return "";
|
|
||||||
|
|
||||||
} catch (Exception e) {
|
|
||||||
return "exception";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Loading…
Reference in New Issue
Block a user