본인인증 후 DUPINFO 업데이트되지 않는 버그 수정
parent
26374eb243
commit
c215284ff8
|
|
@ -8,6 +8,7 @@ import java.net.URL;
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
import java.util.Calendar;
|
import java.util.Calendar;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
import java.util.HashMap;
|
||||||
import java.util.Locale;
|
import java.util.Locale;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Random;
|
import java.util.Random;
|
||||||
|
|
@ -16,6 +17,7 @@ import java.util.regex.PatternSyntaxException;
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import javax.servlet.http.HttpSession;
|
||||||
|
|
||||||
import org.json.simple.JSONObject;
|
import org.json.simple.JSONObject;
|
||||||
import org.json.simple.parser.JSONParser;
|
import org.json.simple.parser.JSONParser;
|
||||||
|
|
@ -30,6 +32,7 @@ import org.springframework.web.servlet.mvc.support.RedirectAttributes;
|
||||||
|
|
||||||
/*import egovframework.cmmn.web.SessionManager;*/
|
/*import egovframework.cmmn.web.SessionManager;*/
|
||||||
import egovframework.rte.fdl.property.EgovPropertyService;
|
import egovframework.rte.fdl.property.EgovPropertyService;
|
||||||
|
import geoinfo.main.login.service.LoginService;
|
||||||
import geoinfo.util.MobileCertificationUtil;
|
import geoinfo.util.MobileCertificationUtil;
|
||||||
|
|
||||||
@Controller
|
@Controller
|
||||||
|
|
@ -38,6 +41,9 @@ public class KmcisController {
|
||||||
@Resource(name = "propertiesService")
|
@Resource(name = "propertiesService")
|
||||||
protected EgovPropertyService propertiesService;
|
protected EgovPropertyService propertiesService;
|
||||||
|
|
||||||
|
@Resource(name = "loginService")
|
||||||
|
private LoginService loginService;
|
||||||
|
|
||||||
private static final Logger LOGGER = LoggerFactory.getLogger(KmcisController.class);
|
private static final Logger LOGGER = LoggerFactory.getLogger(KmcisController.class);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -485,4 +491,31 @@ public class KmcisController {
|
||||||
|
|
||||||
return mav;
|
return mav;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// 사용자식별 정보 업데이트
|
||||||
|
@RequestMapping(value = "/updateUserDI.do")
|
||||||
|
public void updateUserDI(Map<String, Object> map, HttpServletRequest request, HttpServletResponse response, HttpSession session) throws Exception {
|
||||||
|
//위변조 체크
|
||||||
|
String hdnCertNum = request.getParameter("hdnCertNum");
|
||||||
|
String hdnCertification = request.getParameter("hdnCertification");
|
||||||
|
String userId = (String)session.getAttribute("userId");
|
||||||
|
String DI = "";
|
||||||
|
|
||||||
|
Map<String, String> certResult = MobileCertificationUtil.decryptCertData(hdnCertification, hdnCertNum);
|
||||||
|
DI = certResult.get("DI");
|
||||||
|
map.put("userid", userId);
|
||||||
|
updateUserDi(DI, map);
|
||||||
|
LOGGER.info("사용자식별 정보 업데이트 처리 끝 ---------------------------");
|
||||||
|
}
|
||||||
|
|
||||||
|
private void updateUserDi(String DI, Map<String, Object> result ) throws Exception {
|
||||||
|
Map<String, Object> map = new HashMap<String, Object>();
|
||||||
|
// if(result.get("certification_yn").toString().equals("0")) {
|
||||||
|
LOGGER.info("본인인증 진행한 사용자");
|
||||||
|
map.put("DI", DI);
|
||||||
|
map.put("userid", result.get("userid"));
|
||||||
|
loginService.updateCertWebMemberIn(map);
|
||||||
|
// }
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -24,6 +24,8 @@
|
||||||
opener.document.pwsIniFrom.changePhone3.value = '<c:out value="${changePhone3}"/>';
|
opener.document.pwsIniFrom.changePhone3.value = '<c:out value="${changePhone3}"/>';
|
||||||
}
|
}
|
||||||
alert("휴대폰 인증이 완료되었습니다.");
|
alert("휴대폰 인증이 완료되었습니다.");
|
||||||
|
|
||||||
|
opener.updateUserDI('<c:out value="${certNum}"/>', '<c:out value="${recCert}"/>'); <%-- 사용자 식별번호 갱신 --%>
|
||||||
}
|
}
|
||||||
self.close();
|
self.close();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -115,3 +115,27 @@ function XSSCheck(str, level) {
|
||||||
}
|
}
|
||||||
return str;
|
return str;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function updateUserDI(certNem, certf) {
|
||||||
|
var params = {
|
||||||
|
"hdnCertNum" : certNem,
|
||||||
|
"hdnCertification" : certf
|
||||||
|
}
|
||||||
|
$.ajax({
|
||||||
|
url : "/updateUserDI.do",
|
||||||
|
method : "post",
|
||||||
|
data : params,
|
||||||
|
success : function(data){
|
||||||
|
if (data && data.success) {
|
||||||
|
console.log("사용자식별정보 갱신 성공");
|
||||||
|
} else {
|
||||||
|
console.log("갱신 실패: " + data.message);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
error :function(xhr, status, error) {
|
||||||
|
console.log("사용자식별정보 갱신 중 오류 발생");
|
||||||
|
console.log("상태: " + status);
|
||||||
|
console.log("에러 메시지: " + error);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue