마이페이지 보안설정중
This commit is contained in:
parent
88fd5b0223
commit
57e2f874d6
@ -3,6 +3,7 @@ package itn.let.cert.phone.service;
|
||||
import java.util.List;
|
||||
|
||||
import itn.let.mail.service.StatusResponse;
|
||||
import itn.let.uat.uia.web.SendLogVO;
|
||||
|
||||
public interface CertPhoneService {
|
||||
|
||||
@ -28,6 +29,9 @@ public interface CertPhoneService {
|
||||
|
||||
public StatusResponse updateMberCertPhone(MberCertPhoneVO mberCertPhoneVO);
|
||||
|
||||
public StatusResponse selectSysMsgLogCheck(MberCertPhoneVO mberCertPhoneVO);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@ -32,6 +32,8 @@ public class MberCertPhoneVO extends UserDefaultVO{
|
||||
private String certMemo;
|
||||
private String certUseYn;
|
||||
|
||||
private String checkNo;
|
||||
|
||||
|
||||
|
||||
|
||||
@ -66,6 +68,12 @@ public class MberCertPhoneVO extends UserDefaultVO{
|
||||
public void setCertUseYn(String certUseYn) {
|
||||
this.certUseYn = certUseYn;
|
||||
}
|
||||
public String getCheckNo() {
|
||||
return checkNo;
|
||||
}
|
||||
public void setCheckNo(String checkNo) {
|
||||
this.checkNo = checkNo;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@ -34,4 +34,8 @@ public class CertPhoneDAO extends EgovAbstractDAO {
|
||||
public List<MberCertPhoneVO> selectMberCertPhoneListVO(MberCertPhoneVO mberCertPhoneVO) {
|
||||
return (List<MberCertPhoneVO>) list("mberCertPhoneVO.selectMberCertPhoneListVO", mberCertPhoneVO);
|
||||
}
|
||||
|
||||
public int countSysMsgLogCheck(MberCertPhoneVO mberCertPhoneVO) {
|
||||
return (int) select("mberCertPhoneVO.countSysMsgLogCheck", mberCertPhoneVO);
|
||||
}
|
||||
}
|
||||
|
||||
@ -64,5 +64,22 @@ public class CertPhoneServiceImpl extends EgovAbstractServiceImpl implements Cer
|
||||
certPhoneDAO.updateMberCertPhone(mberCertPhoneVO);
|
||||
return new StatusResponse(HttpStatus.OK, "수정 하였습니다.", LocalDateTime.now());
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public StatusResponse selectSysMsgLogCheck(MberCertPhoneVO mberCertPhoneVO) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
int certCnt = 0;
|
||||
certCnt = certPhoneDAO.countSysMsgLogCheck(mberCertPhoneVO);
|
||||
|
||||
if(certCnt < 1) {
|
||||
return new StatusResponse(HttpStatus.BAD_REQUEST, "[인증번호 불일치] 입력하신 정보를 재확인 해주세요.", LocalDateTime.now());
|
||||
}
|
||||
|
||||
return new StatusResponse(HttpStatus.OK, "", LocalDateTime.now());
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -1,6 +1,8 @@
|
||||
package itn.let.cert.phone.web;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
@ -14,9 +16,13 @@ import org.springframework.web.servlet.ModelAndView;
|
||||
import egovframework.rte.fdl.security.userdetails.util.EgovUserDetailsHelper;
|
||||
import itn.com.cmm.LoginVO;
|
||||
import itn.com.utl.fcc.service.EgovStringUtil;
|
||||
import itn.let.cert.phone.service.MberCertPhoneVO;
|
||||
import itn.let.cert.phone.service.CertPhoneService;
|
||||
import itn.let.cert.phone.service.MberCertPhoneVO;
|
||||
import itn.let.mail.service.StatusResponse;
|
||||
import itn.let.mjo.msg.service.MjonMsgVO;
|
||||
import itn.let.mjo.msgdata.service.MjonMsgDataService;
|
||||
import itn.let.mjo.msgdata.service.MjonMsgReturnVO;
|
||||
import itn.let.uat.uia.web.SendLogVO;
|
||||
|
||||
/**
|
||||
*
|
||||
@ -40,8 +46,28 @@ public class CertPhoneController {
|
||||
@Resource(name = "CertPhoneService")
|
||||
private CertPhoneService certPhoneService;
|
||||
|
||||
@Resource(name = "MjonMsgDataService")
|
||||
private MjonMsgDataService mjonMsgDataService;
|
||||
|
||||
|
||||
|
||||
@RequestMapping(value = {"/cert/phone/selectMberCertPhoneList"})
|
||||
public ResponseEntity<StatusResponse> selectMberCertPhoneList(MberCertPhoneVO mberCertPhoneVO) throws Exception {
|
||||
|
||||
ModelAndView modelAndView = new ModelAndView();
|
||||
modelAndView.setViewName("jsonView");
|
||||
|
||||
//로그인 권한정보 불러오기
|
||||
LoginVO loginVO = EgovUserDetailsHelper.isAuthenticated()? (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser():null;
|
||||
String userId = loginVO == null ? "" : EgovStringUtil.isNullToString(loginVO.getId());
|
||||
|
||||
if(userId == null) {
|
||||
if(StringUtils.isEmpty(userId)) return ResponseEntity.ok().body(new StatusResponse(HttpStatus.BAD_REQUEST, "로그인 후 이용해 주세요", LocalDateTime.now()));
|
||||
}
|
||||
mberCertPhoneVO.setMberId(userId);
|
||||
|
||||
return ResponseEntity.ok().body(certPhoneService.selectMberCertPhoneList(mberCertPhoneVO));
|
||||
}
|
||||
|
||||
@RequestMapping(value = {"/cert/phone/findByCertPhoneInfo.do"})
|
||||
public ResponseEntity<StatusResponse> findByCertPhoneInfo(MberCertPhoneVO mberCertPhoneVO) throws Exception {
|
||||
@ -73,6 +99,7 @@ public class CertPhoneController {
|
||||
if(StringUtils.isEmpty(userId)) return ResponseEntity.ok().body(new StatusResponse(HttpStatus.BAD_REQUEST, "로그인 후 이용해 주세요", LocalDateTime.now()));
|
||||
}
|
||||
mberCertPhoneVO.setFrstRegisterId(userId);
|
||||
mberCertPhoneVO.setMberId(userId);
|
||||
|
||||
|
||||
return ResponseEntity.ok().body(certPhoneService.insertCertPhone(mberCertPhoneVO));
|
||||
@ -121,25 +148,8 @@ public class CertPhoneController {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/*
|
||||
|
||||
@RequestMapping(value = {"/uss/umt/user/updateCertPhone.do"})
|
||||
public ResponseEntity<StatusResponse> updateCertPhone(MberCertPhoneVO mberCertPhoneVO) throws Exception {
|
||||
|
||||
ModelAndView modelAndView = new ModelAndView();
|
||||
modelAndView.setViewName("jsonView");
|
||||
@RequestMapping(value = {"/cert/phone/sendSysMsgDataAjax.do"})
|
||||
public ResponseEntity<StatusResponse> sendSysMsgDataAjax(MberCertPhoneVO mberCertPhoneVO) throws Exception {
|
||||
|
||||
//로그인 권한정보 불러오기
|
||||
LoginVO loginVO = EgovUserDetailsHelper.isAuthenticated()? (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser():null;
|
||||
@ -148,31 +158,69 @@ public class CertPhoneController {
|
||||
if(userId == null) {
|
||||
if(StringUtils.isEmpty(userId)) return ResponseEntity.ok().body(new StatusResponse(HttpStatus.BAD_REQUEST, "로그인 후 이용해 주세요", LocalDateTime.now()));
|
||||
}
|
||||
mberCertPhoneVO.setFrstRegisterId(userId);
|
||||
mberCertPhoneVO.setMberId(userId);
|
||||
|
||||
|
||||
|
||||
|
||||
return ResponseEntity.ok().body(certPhoneService.updateMberCertPhoneInfo(mberCertPhoneVO));
|
||||
|
||||
MjonMsgVO mjonMsgVO = new MjonMsgVO();
|
||||
mjonMsgVO.setCallTo(mberCertPhoneVO.getMbtlnum());
|
||||
MjonMsgReturnVO returnVO = mjonMsgDataService.sendSysMsgData(mjonMsgVO);
|
||||
|
||||
|
||||
String resultSts = returnVO.getSendMsgCnt();
|
||||
String resultBlockSts = returnVO.getSendMsgBlockCnt();
|
||||
|
||||
String msg= "";
|
||||
Map<String, String> returnMap = new HashMap<>();
|
||||
HttpStatus httpStatus = null;
|
||||
if (!resultSts.equals("0")) {
|
||||
|
||||
httpStatus = HttpStatus.OK;
|
||||
returnMap.put("msg", "문자 전송이 완료되었습니다.");
|
||||
returnMap.put("resultSts", resultSts);
|
||||
returnMap.put("resultBlockSts", resultBlockSts);
|
||||
|
||||
} else {
|
||||
|
||||
httpStatus = HttpStatus.BAD_REQUEST;
|
||||
returnMap.put("msg", "문자 전송에 오류가 발생하였습니다.");
|
||||
returnMap.put("resultSts", "0");
|
||||
returnMap.put("resultBlockSts", "0");
|
||||
|
||||
}
|
||||
return ResponseEntity.ok().body(new StatusResponse(httpStatus, returnMap, LocalDateTime.now()));
|
||||
|
||||
}
|
||||
|
||||
@RequestMapping(value = {"/uss/umt/user/deleteCertPhone.do"})
|
||||
public ResponseEntity<StatusResponse> deleteCertPhone(MberCertPhoneVO mberCertPhoneVO) throws Exception {
|
||||
|
||||
ModelAndView modelAndView = new ModelAndView();
|
||||
modelAndView.setViewName("jsonView");
|
||||
|
||||
|
||||
|
||||
@RequestMapping(value = {"/cert/phone/selectSysMsgLogCheck.do"})
|
||||
public ResponseEntity<StatusResponse> selectSysMsgLogCheck(MberCertPhoneVO mberCertPhoneVO) throws Exception {
|
||||
|
||||
//로그인 권한정보 불러오기
|
||||
LoginVO loginVO = EgovUserDetailsHelper.isAuthenticated()? (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser():null;
|
||||
String userId = loginVO == null ? "" : EgovStringUtil.isNullToString(loginVO.getId());
|
||||
|
||||
|
||||
if(userId == null) {
|
||||
if(StringUtils.isEmpty(userId)) return ResponseEntity.ok().body(new StatusResponse(HttpStatus.BAD_REQUEST, "로그인 후 이용해 주세요", LocalDateTime.now()));
|
||||
}
|
||||
mberCertPhoneVO.setLastUpdusrId(userId);
|
||||
|
||||
|
||||
|
||||
return ResponseEntity.ok().body(certPhoneService.deleteCertPhoneInfo(mberCertPhoneVO));
|
||||
}
|
||||
*/
|
||||
|
||||
mberCertPhoneVO.setMberId(userId);
|
||||
//
|
||||
return ResponseEntity.ok().body(certPhoneService.selectSysMsgLogCheck(mberCertPhoneVO));
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
@ -177,6 +177,8 @@ public interface MjonMsgDataService {
|
||||
//팩스 거래명세서 합산 정보
|
||||
public List<MjonMsgVO> selectPayUserSumFaxList(MjonMsgVO mjonMsgVO) throws Exception;
|
||||
|
||||
public MjonMsgReturnVO sendSysMsgData(MjonMsgVO mjonMsgVO) throws Exception;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@ -5,6 +5,7 @@ import java.util.ArrayList;
|
||||
import java.util.Calendar;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
@ -3156,5 +3157,86 @@ public class MjonMsgDataServiceImpl extends EgovAbstractServiceImpl implements M
|
||||
return mjonMsgDataDAO.selectPayUserSumFaxList(mjonMsgVO);
|
||||
}
|
||||
|
||||
@Override
|
||||
public MjonMsgReturnVO sendSysMsgData(MjonMsgVO mjonMsgVO) throws Exception {
|
||||
|
||||
|
||||
|
||||
// 비밀번호 찾기 문자내용
|
||||
String contents = "[문자온] 인증번호 : %code%";
|
||||
String code = "";
|
||||
long seed = System.currentTimeMillis();
|
||||
Random random = new Random(seed);
|
||||
// code = Integer.toString(random.nextInt(4));
|
||||
StringBuffer randomCode = new StringBuffer();
|
||||
for (int i = 0; i < 6; i++) {
|
||||
code = randomCode.append(Integer.toString(random.nextInt(10))).toString();
|
||||
}
|
||||
contents = contents.replace("%code%", code);
|
||||
System.out.println("contents : "+ contents);
|
||||
System.out.println("contents : "+ contents);
|
||||
System.out.println("contents : "+ contents);
|
||||
System.out.println("contents : "+ contents);
|
||||
System.out.println("contents : "+ contents);
|
||||
|
||||
mjonMsgVO.setSmsTxt(contents);
|
||||
mjonMsgVO.setReserveYn("N");
|
||||
// 시스템 문자발송 번호
|
||||
mjonMsgVO.setCallFrom("15518011");
|
||||
|
||||
mjonMsgVO.setUserId("system");
|
||||
|
||||
String msgType = "4";
|
||||
|
||||
// 전송사 전송 배분
|
||||
MjonMsgVO pramVO = new MjonMsgVO();
|
||||
List<MjonMsgVO> sendRateList = mjonMsgDAO.selectTodayAgentSendCntList(pramVO); // 전송사 전송 배분률 및 현재 전송건수
|
||||
// 조회
|
||||
for (MjonMsgVO tmpVO : sendRateList) {
|
||||
float cnt = Float.parseFloat(tmpVO.getMsgGroupCnt());
|
||||
float totCnt = tmpVO.getTotCnt();
|
||||
tmpVO.setSendRateInfo(Float.parseFloat(tmpVO.getSendRate()) - (cnt / totCnt * 100)); // 배분률 - 현재전송 비율
|
||||
}
|
||||
|
||||
String sendAgent = sendRateList.get(0).getAgentCode();
|
||||
float maxRate = sendRateList.get(0).getSendRateInfo();
|
||||
for (MjonMsgVO tmpVO : sendRateList) { // 배분률 대비 현재전송 비율이 가장 적은거 찾기
|
||||
if (maxRate < tmpVO.getSendRateInfo()) {
|
||||
maxRate = tmpVO.getSendRateInfo();
|
||||
sendAgent = tmpVO.getAgentCode();
|
||||
}
|
||||
}
|
||||
|
||||
mjonMsgVO.setMsgDiv("S"); // 단문
|
||||
|
||||
// 문자타입별 대표전송사 정보
|
||||
MjonMsgVO mjonMsgVO2 = new MjonMsgVO();
|
||||
mjonMsgVO2 = mjonMsgDAO.selectRepMsgAgetnInfo(mjonMsgVO);
|
||||
// 전송사 구분 코드 - 01 : 아이하트, 02 : 현대 퓨쳐넷, 03 : 아이엠오, 04 : 다우기술
|
||||
mjonMsgVO.setAgentCode(mjonMsgVO2.getAgentCode()); //전송사 선택
|
||||
// 전송금액
|
||||
mjonMsgVO.setTotPrice(mjonMsgVO2.getAgentPrice().toString()); //총금액
|
||||
mjonMsgVO.setEachPrice(mjonMsgVO2.getAgentPrice().toString()); //한건 금액
|
||||
|
||||
mjonMsgVO.setMsgType("4");
|
||||
|
||||
MjonMsgReturnVO returnVO = mjonMsgDataService.insertSysMsgDataInfo(mjonMsgVO);
|
||||
|
||||
|
||||
// 시스템 발송 로그
|
||||
SendLogVO sendLogVO = new SendLogVO();
|
||||
// SendType 1:문자로 발송 2:이메일로 발송
|
||||
sendLogVO.setSendId(returnVO.getMsgGroupId());
|
||||
sendLogVO.setSendType("1");
|
||||
sendLogVO.setFrstSendInfo(mjonMsgVO.getCallFrom());
|
||||
sendLogVO.setReceive(mjonMsgVO.getCallTo());
|
||||
sendLogVO.setCheckNo(code);
|
||||
sendLogVO.setContents(contents);
|
||||
|
||||
mjonMsgDataService.insertSysMsgLog(sendLogVO);
|
||||
|
||||
return returnVO;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -3588,27 +3588,6 @@ public class EgovLoginController {
|
||||
String resultSts = "0";
|
||||
String resultBlockSts = "0";
|
||||
|
||||
// 비밀번호 찾기 문자내용
|
||||
String contents = "[문자온] 인증번호 : %code%";
|
||||
String code = "";
|
||||
long seed = System.currentTimeMillis();
|
||||
Random random = new Random(seed);
|
||||
// code = Integer.toString(random.nextInt(4));
|
||||
StringBuffer randomCode = new StringBuffer();
|
||||
for (int i = 0; i < 6; i++) {
|
||||
code = randomCode.append(Integer.toString(random.nextInt(10))).toString();
|
||||
}
|
||||
contents = contents.replace("%code%", code);
|
||||
System.out.println("contents : "+ contents);
|
||||
System.out.println("contents : "+ contents);
|
||||
System.out.println("contents : "+ contents);
|
||||
System.out.println("contents : "+ contents);
|
||||
System.out.println("contents : "+ contents);
|
||||
|
||||
mjonMsgVO.setSmsTxt(contents);
|
||||
mjonMsgVO.setReserveYn("N");
|
||||
// 시스템 문자발송 번호
|
||||
mjonMsgVO.setCallFrom("15518011");
|
||||
// 문자 수신 번호 jsp에서 받아와야함!
|
||||
/* mjonMsgVO.setCallTo(callTo); */
|
||||
|
||||
@ -3619,22 +3598,6 @@ public class EgovLoginController {
|
||||
// 사용자 유효성 검사
|
||||
// id, hp, nm
|
||||
try {
|
||||
UserManageVO userManageVO = new UserManageVO();
|
||||
|
||||
userManageVO.setEmplyrId(mjonMsgVO.getUserId());
|
||||
userManageVO.setEmplyrNm(mjonMsgVO.getSearchNm());
|
||||
userManageVO.setMoblphonNo(mjonMsgVO.getCallTo());
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
MberCertPhoneVO mberCertPhoneVO = new MberCertPhoneVO();
|
||||
mberCertPhoneVO.setMbtlnum(mjonMsgVO.getCallTo());
|
||||
mberCertPhoneVO.setMberId(mjonMsgVO.getUserId());
|
||||
|
||||
|
||||
List<MberCertPhoneVO> mberCertPhoneList = certPhoneService.selectMberCertPhoneList(mjonMsgVO.getUserId());
|
||||
@ -3655,7 +3618,13 @@ public class EgovLoginController {
|
||||
|
||||
return modelAndView;
|
||||
}
|
||||
|
||||
|
||||
UserManageVO userManageVO = new UserManageVO();
|
||||
|
||||
userManageVO.setEmplyrId(mjonMsgVO.getUserId());
|
||||
userManageVO.setEmplyrNm(mjonMsgVO.getSearchNm());
|
||||
userManageVO.setMoblphonNo(mjonMsgVO.getCallTo());
|
||||
|
||||
|
||||
List<UserManageVO> usedNmList = userManageService.selectUserIdAjax2(userManageVO);
|
||||
if(!usedNmList.get(0).getMberSttus().equals("Y")) {
|
||||
@ -3685,59 +3654,15 @@ public class EgovLoginController {
|
||||
}
|
||||
|
||||
try {
|
||||
|
||||
mjonMsgVO.setUserId("system");
|
||||
|
||||
String msgType = "4";
|
||||
|
||||
// 전송사 전송 배분
|
||||
MjonMsgVO pramVO = new MjonMsgVO();
|
||||
List<MjonMsgVO> sendRateList = mjonMsgService.selectTodayAgentSendCntList(pramVO); // 전송사 전송 배분률 및 현재 전송건수
|
||||
// 조회
|
||||
for (MjonMsgVO tmpVO : sendRateList) {
|
||||
float cnt = Float.parseFloat(tmpVO.getMsgGroupCnt());
|
||||
float totCnt = tmpVO.getTotCnt();
|
||||
tmpVO.setSendRateInfo(Float.parseFloat(tmpVO.getSendRate()) - (cnt / totCnt * 100)); // 배분률 - 현재전송 비율
|
||||
}
|
||||
|
||||
String sendAgent = sendRateList.get(0).getAgentCode();
|
||||
float maxRate = sendRateList.get(0).getSendRateInfo();
|
||||
for (MjonMsgVO tmpVO : sendRateList) { // 배분률 대비 현재전송 비율이 가장 적은거 찾기
|
||||
if (maxRate < tmpVO.getSendRateInfo()) {
|
||||
maxRate = tmpVO.getSendRateInfo();
|
||||
sendAgent = tmpVO.getAgentCode();
|
||||
}
|
||||
}
|
||||
|
||||
mjonMsgVO.setMsgDiv("S"); // 단문
|
||||
|
||||
// 문자타입별 대표전송사 정보
|
||||
MjonMsgVO mjonMsgVO2 = new MjonMsgVO();
|
||||
mjonMsgVO2 = mjonMsgService.selectRepMsgAgetnInfo(mjonMsgVO);
|
||||
// 전송사 구분 코드 - 01 : 아이하트, 02 : 현대 퓨쳐넷, 03 : 아이엠오, 04 : 다우기술
|
||||
mjonMsgVO.setAgentCode(mjonMsgVO2.getAgentCode()); //전송사 선택
|
||||
// 전송금액
|
||||
mjonMsgVO.setTotPrice(mjonMsgVO2.getAgentPrice().toString()); //총금액
|
||||
mjonMsgVO.setEachPrice(mjonMsgVO2.getAgentPrice().toString()); //한건 금액
|
||||
|
||||
mjonMsgVO.setMsgType("4");
|
||||
|
||||
MjonMsgReturnVO returnVO = mjonMsgDataService.insertSysMsgDataInfo(mjonMsgVO);
|
||||
|
||||
|
||||
|
||||
MjonMsgReturnVO returnVO = mjonMsgDataService.sendSysMsgData(mjonMsgVO);
|
||||
|
||||
resultSts = returnVO.getSendMsgCnt();
|
||||
resultBlockSts = returnVO.getSendMsgBlockCnt();
|
||||
|
||||
// 시스템 발송 로그
|
||||
SendLogVO sendLogVO = new SendLogVO();
|
||||
// SendType 1:문자로 발송 2:이메일로 발송
|
||||
sendLogVO.setSendId(returnVO.getMsgGroupId());
|
||||
sendLogVO.setSendType("1");
|
||||
sendLogVO.setFrstSendInfo(mjonMsgVO.getCallFrom());
|
||||
sendLogVO.setReceive(mjonMsgVO.getCallTo());
|
||||
sendLogVO.setCheckNo(code);
|
||||
sendLogVO.setContents(contents);
|
||||
|
||||
mjonMsgDataService.insertSysMsgLog(sendLogVO);
|
||||
|
||||
} catch (Exception e) {
|
||||
|
||||
|
||||
@ -115,5 +115,20 @@
|
||||
|
||||
</update>
|
||||
|
||||
<select id="mberCertPhoneVO.countSysMsgLogCheck" parameterClass="mberCertPhoneVO" resultClass="int">
|
||||
SELECT
|
||||
COUNT(*)
|
||||
FROM
|
||||
MJ_SYSTEM_SEND
|
||||
WHERE
|
||||
CHECK_NO = #checkNo#
|
||||
AND
|
||||
RECEIVE = #mbtlnum#
|
||||
AND
|
||||
DATE_FORMAT(FRST_SEND_PNTTM, '%Y%m%d%H%i%s') > DATE_FORMAT( date_add(now(),interval -300 second), '%Y%m%d%H%i%s')
|
||||
|
||||
|
||||
|
||||
</select>
|
||||
|
||||
</sqlMap>
|
||||
@ -3724,6 +3724,7 @@
|
||||
</select>
|
||||
|
||||
<select id="mjonMsgDAO.selectSysMsgLogCheck_new" parameterClass="SendLogVO" resultClass="SendLogVO">
|
||||
/*mjonMsgDAO.selectSysMsgLogCheck_new*/
|
||||
SELECT a.SEND_ID AS sendId,
|
||||
a.SEND_TYPE AS sendType,
|
||||
a.FRST_SEND_INFO AS frstSendInfo,
|
||||
|
||||
@ -58,6 +58,72 @@ $(document).ready(function(){
|
||||
|
||||
// 보안 로그인
|
||||
$(document).ready(function(){
|
||||
|
||||
// 인증번호 발송 버튼
|
||||
$('#certReqBtn').on('click', function(){
|
||||
var certReqPhone = $('#certReqPhone').val();
|
||||
|
||||
if (certReqPhone==''){
|
||||
alert("핸드폰번호를 입력해주세요.");
|
||||
return;
|
||||
}
|
||||
var params = {"mbtlnum" : certReqPhone }
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url : "<c:url value='/cert/phone/sendSysMsgDataAjax.do' />",
|
||||
data: params,
|
||||
dataType:'json',
|
||||
async: false,
|
||||
success: function (returnData) {
|
||||
console.log('returnData : ', returnData);
|
||||
if(returnData.status == 'OK'){
|
||||
alert(returnData.object.msg);
|
||||
$("#certReqPhone").prop("disabled", true);
|
||||
}
|
||||
else
|
||||
{
|
||||
alert("오류가 발생하였습니다.");
|
||||
}
|
||||
},
|
||||
error: function (e) { alert("오류가 발생하였습니다."); console.log("ERROR : ", e); }
|
||||
});
|
||||
});
|
||||
|
||||
// 인증 버튼
|
||||
$('#certConfirmBtn').on('click', function(){
|
||||
var certReqPhone = $('#certReqPhone').val();
|
||||
var certNumber = $('#certNumber').val();
|
||||
|
||||
if (certNumber==''){
|
||||
alert("인증번호를 입력해주세요.");
|
||||
return;
|
||||
}
|
||||
var params = {"mbtlnum" : certReqPhone, "checkNo" : certNumber }
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url : "<c:url value='/cert/phone/selectSysMsgLogCheck.do' />",
|
||||
data: params,
|
||||
dataType:'json',
|
||||
async: false,
|
||||
success: function (returnData) {
|
||||
console.log('returnData : ', returnData);
|
||||
if(returnData.status == 'OK'){
|
||||
// alert(returnData.object.msg);
|
||||
regCertPhone(params);
|
||||
}
|
||||
else if(returnData.status == 'BAD_REQUEST'){
|
||||
alert(returnData.message);
|
||||
}
|
||||
else
|
||||
{
|
||||
alert("오류가 발생하였습니다.");
|
||||
}
|
||||
},
|
||||
error: function (e) { alert("오류가 발생하였습니다."); console.log("ERROR : ", e); }
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
|
||||
$('#showLoginBtn').on('click', function() {
|
||||
if ($('#securityLogin').is(':visible')) {
|
||||
@ -152,6 +218,32 @@ $(document).ready(function(){
|
||||
});
|
||||
|
||||
|
||||
function regCertPhone(params){
|
||||
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "/cert/phone/insertCertPhone.do",
|
||||
data: params,
|
||||
dataType:'json',
|
||||
async: false,
|
||||
success: function (returnData) {
|
||||
if(returnData.status == 'OK'){
|
||||
findAllCertIp();
|
||||
}else if(returnData.status == 'CONFLICT'){
|
||||
alert(returnData.message);
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
alert("오류가 발생하였습니다.");
|
||||
}
|
||||
},
|
||||
error: function (e) { alert("오류가 발생하였습니다."); console.log("ERROR : ", e); }
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
|
||||
function findAllCertIp(){
|
||||
|
||||
$.ajax({
|
||||
@ -202,6 +294,56 @@ function findAllCertIp(){
|
||||
});
|
||||
}
|
||||
|
||||
function findAllCertPhone(){
|
||||
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "/cert/ip/selectMberCertIpList.do",
|
||||
data: null,
|
||||
dataType:'json',
|
||||
async: false,
|
||||
success: function (returnData) {
|
||||
if (returnData.status === "OK") {
|
||||
const objects = returnData.object; // 배열 데이터
|
||||
|
||||
// tbody의 기존 내용 삭제
|
||||
const $tbody = $(".ip_table tbody");
|
||||
$tbody.empty();
|
||||
|
||||
// 배열 데이터를 기반으로 tr 생성 후 tbody에 추가
|
||||
$.each(objects, function(index, obj) {
|
||||
const $tr = $("<tr></tr>"); // tr 요소 생성
|
||||
|
||||
// 각 td 요소 생성
|
||||
const $certIp = $("<td></td>").text(obj.certIp || "");
|
||||
const $certMemo = $("<td></td>").text(obj.certMemo || "");
|
||||
const $frstRegistPnttm = $("<td></td>").text(obj.frstRegistPnttm || "등록되지 않음");
|
||||
const $deleteBtn = $("<button></button>")
|
||||
.addClass("btnType btn_text btn_lightgray fill btn_28")
|
||||
.text("삭제")
|
||||
.attr("type", "button")
|
||||
.attr("id", "ipDelBtn")
|
||||
.on("click", function() {
|
||||
deleteRow(obj.certIp); // 삭제 버튼 클릭 시 실행
|
||||
});
|
||||
|
||||
// 관리 버튼을 감쌀 td 생성
|
||||
const $deleteTd = $("<td></td>").append($deleteBtn);
|
||||
|
||||
// tr에 td 추가
|
||||
$tr.append($certIp, $certMemo, $frstRegistPnttm, $deleteTd);
|
||||
|
||||
// tbody에 tr 추가
|
||||
$tbody.append($tr);
|
||||
});
|
||||
} else {
|
||||
alert("데이터를 불러오는 데 실패했습니다.");
|
||||
}
|
||||
},
|
||||
error: function (e) { alert("오류가 발생하였습니다."); console.log("ERROR : ", e); }
|
||||
});
|
||||
}
|
||||
|
||||
// IP 삭제
|
||||
function deleteRow(p_ip){
|
||||
|
||||
@ -565,6 +707,62 @@ function callTo() {
|
||||
</div>
|
||||
</div>
|
||||
<!-- //펙스 팝업 -->
|
||||
|
||||
|
||||
|
||||
<div class="mask"></div>
|
||||
|
||||
<!-- 휴대폰인증 팝업 -->
|
||||
<div class="tooltip-wrap">
|
||||
<div class="popup-com certify_layer popup05" tabindex="0" data-tooltip-con="popup05" data-focus="popup05" data-focus-prev="popup05-close" style="width: 500px;">
|
||||
<div class="popup_heading">
|
||||
<p>휴대폰 인증</p>
|
||||
<button type="button" class="tooltip-close" data-focus="popup05-close"><img src="/publish/images/content/layerPopup_close.png" alt="팝업 닫기"></button>
|
||||
</div>
|
||||
<div class="layer_in">
|
||||
<div class="hascont">
|
||||
<table class="layer_tType1">
|
||||
<caption>본인인증(step1) 표</caption>
|
||||
<colgroup>
|
||||
<col style="width: 95px">
|
||||
<col style="width: auto">
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>핸드폰번호</th>
|
||||
<td>
|
||||
<label for="" class="label">핸드폰번호 입력</label>
|
||||
<input type="text" placeholder="‘-’없이 번호만 입력 " id="certReqPhone" onfocus="this.placeholder=''"
|
||||
onblur="this.placeholder='‘-’없이 번호만 입력 '" class="inputLight" style="width: 200px;"
|
||||
oninput="this.value = this.value.replace(/[^0-9]/g, '');" maxlength="14"/>
|
||||
<button type="button" id="certReqBtn" class="btnType btnType6" style="width:90px">인증요청</button>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>인증번호</th>
|
||||
<td>
|
||||
<label for="" class="label">인증번호 입력</label>
|
||||
<input type="text" placeholder="인증번호 4자리 입력" id="certNumber" onfocus="this.placeholder=''" onblur="this.placeholder='인증번호 4자리 입력'" class="inputLight" style="width: 200px;">
|
||||
<button type="button" id="certConfirmBtn" class="btnType btnType6" style="width:90px">확인</button>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="popup_btn_wrap2">
|
||||
<button type="button" class="tooltip-close" data-focus="popup05-close" data-focus-next="popup05">닫기</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!--// 휴대폰인증 팝업 -->
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<input type="button" id="tooltopClick" data-tooltip="rev_popup01" style="display:none;"/>
|
||||
<div class="inner">
|
||||
<!-- send top -->
|
||||
@ -775,7 +973,7 @@ function callTo() {
|
||||
<p>인증에 사용할 휴대폰번호를 추가로 등록하여 관리할 수 있습니다. <br>
|
||||
(등록 및 삭제 시 휴대폰 본인인증 필요)</p>
|
||||
</div>
|
||||
<button type="button" class="btn_plus"><img src="/publish/images/content/mypage_plus.png" alt="더보기"></button>
|
||||
<button type="button" data-tooltip="popup05" class="btn_plus"><img src="/publish/images/content/mypage_plus.png" alt="더보기"></button>
|
||||
</div>
|
||||
|
||||
<div class="table_wrap">
|
||||
|
||||
Loading…
Reference in New Issue
Block a user