refactor: id / password 찾기 refactoring

main
Jonguk. Lim 2 years ago
parent 21c2ebad4f
commit 2bfe93765d

@ -27,6 +27,7 @@ import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.context.support.WebApplicationContextUtils;
import org.springframework.web.servlet.ModelAndView;
import egovframework.rte.fdl.security.userdetails.util.EgovUserDetailsHelper;
import kr.xit.framework.biz.cmm.model.XitUserInfoVO;
@ -73,8 +74,8 @@ public class XitLoginController {
* @return
* @exception Exception
*/
@RequestMapping(value = "actionMain", method={RequestMethod.GET, RequestMethod.POST})
public String actionMain(HttpServletResponse response, HttpServletRequest request, ModelMap model)
@RequestMapping(value = "/actionMain")
public String actionMain()
throws Exception {
// 1. Spring Security 사용자권한 처리
@ -111,7 +112,7 @@ public class XitLoginController {
* @author:
* @date: 2020. 3. 23.
*/
@RequestMapping(value = "actionSecurityLogin", method={RequestMethod.GET, RequestMethod.POST})
@RequestMapping(value = "/actionSecurityLogin")
public String actionSecurityLogin(@ModelAttribute("loginVO") XitLoginVO loginVO, HttpServletResponse response,
HttpServletRequest request, ModelMap model, @RequestParam Map<String, String> paraMap) throws Exception {
@ -195,8 +196,8 @@ public class XitLoginController {
* @return String
* @exception Exception
*/
@RequestMapping(value = "actionLogout", method={RequestMethod.GET, RequestMethod.POST})
public String actionLogout(HttpServletRequest request, ModelMap model) throws Exception {
@RequestMapping(value = "/actionLogout")
public String actionLogout(HttpServletRequest request) {
request.getSession().setAttribute("XitLoginSession", null);
return "redirect:/egov_security_logout.do";
@ -207,7 +208,7 @@ public class XitLoginController {
* @return String
* @exception Exception
*/
@RequestMapping(value="accessDenied", method={RequestMethod.GET, RequestMethod.POST})
@RequestMapping(value="accessDenied")
public void accessDenied(HttpServletRequest request, HttpServletResponse response) throws Exception {
/* ======================================================
* 2020.11.24.
@ -266,27 +267,28 @@ public class XitLoginController {
* @throws Exception
* @date: 2020. 10. 21.
*/
@RequestMapping(value = "FindId_{page}_popup", method={RequestMethod.GET, RequestMethod.POST})
public String FindId_page_popup(Model model
, HttpSession session
, @PathVariable String page
, @ModelAttribute("xitLoginVO") XitLoginVO vo
) throws Exception{
@RequestMapping(value = "/findIdPopup/{page}")
public ModelAndView findIdPopup(@PathVariable String page, @ModelAttribute("xitLoginVO") XitLoginVO vo) throws Exception{
ModelAndView mav = new ModelAndView();
switch (page) {
case "input": //아이디 찾기 -정보입력 페이지
case "input": //아이디 찾기 -정보입력 페이지
mav.setViewName(FrameworkConstants.FRAMEWORK_JSP_BASE_PATH +"login/findIdFormPopup.popup");
break;
case "inputEvr": //(모든사용자)아이디 찾기 -정보입력 페이지
mav.setViewName(FrameworkConstants.FRAMEWORK_JSP_BASE_PATH +"login/findIdEvrFormPopup.popup");
break;
case "result": //아이디 찾기 -결과
XitLoginVO loginVO = xitLoginService.findId(vo);
model.addAttribute("userId",loginVO.getId());
mav.addObject("userId",loginVO.getId());
mav.setViewName(FrameworkConstants.FRAMEWORK_JSP_BASE_PATH +"login/findIdResultFormPopup.popup");
break;
default:
throw new RuntimeException("유효하지 않은 요청 입니다.");
}
return FrameworkConstants.FRAMEWORK_JSP_BASE_PATH +"login/XitFindId_"+page+"_popup"+ FrameworkConstants.TILES_TYPE.POPUP.getVal();
return mav;
}
@ -302,26 +304,26 @@ public class XitLoginController {
* @author:
* @date: 2020. 10. 21.
*/
@RequestMapping(value = "FindPwd_{page}_popup", method={RequestMethod.GET, RequestMethod.POST})
public String FindPwd_page_popup(ModelMap model
, HttpSession session
, @ModelAttribute("xitUserInfoVO") XitUserInfoVO xitUserInfoVO
, @PathVariable String page
) throws IOException, SQLException, RuntimeException {
@RequestMapping(value = "findPwdPopup/{page}")
public ModelAndView findPwdPopup(@ModelAttribute("xitUserInfoVO") XitUserInfoVO xitUserInfoVO, @PathVariable String page) throws RuntimeException {
ModelAndView mav = new ModelAndView();
switch (page) {
case "input": //비밀번호 찾기 -정보입력 페이지
case "input": //비밀번호 찾기 -정보입력 페이지
mav.setViewName(FrameworkConstants.FRAMEWORK_JSP_BASE_PATH +"login/findPwdFormPopup.popup");
break;
case "inputEvr": //(모든사용자)비밀번호 찾기 -정보입력 페이지
mav.setViewName(FrameworkConstants.FRAMEWORK_JSP_BASE_PATH +"login/findPwdEvrFormPopup.popup");
break;
case "result": //비밀번호 찾기 -결과
mav.setViewName(FrameworkConstants.FRAMEWORK_JSP_BASE_PATH +"login/findPwdResultFormPopup.popup");
break;
default:
throw new RuntimeException("유효하지 않은 요청 입니다.");
}
return FrameworkConstants.FRAMEWORK_JSP_BASE_PATH +"login/XitFindPwd_"+page+"_popup"+ FrameworkConstants.TILES_TYPE.POPUP.getVal();
return mav;
}
/**
@ -379,7 +381,7 @@ public class XitLoginController {
model.addAttribute("failDetail", failDetail);
model.addAttribute("temp_pwd", vo.getPassword());
sLocationUrl = "forward:/login/FindPwd_result_popup.do";
sLocationUrl = "forward:/login/findPwdPopup/result.do";
break;
// case "delete": //삭제

@ -124,7 +124,7 @@ function fnReg(){
* 아이디 찾기 팝업
*/
function fn_FindId(){
var popUrl = "${ctx}/login/FindId_inputEvr_popup.do";
var popUrl = "${ctx}/login/findIdPopup/inputEvr.do";
var popOption = "width=530px, height=365x, resizable=no, location=no, top=100px, left100px";
var target = '아이디 찾기';
@ -135,7 +135,7 @@ function fn_FindId(){
* 비밀번호 찾기 팝업
*/
function fn_FindPw(){
var popUrl = "${ctx}/login/FindPwd_inputEvr_popup.do";
var popUrl = "${ctx}/login/findPwdPopup/inputEvr.do";
var popOption = "width=530px, height=380px, resizable=no, location=no, top=100px, left100px";
var target = '비밀번호 찾기';

@ -172,14 +172,14 @@
* 아이디 찾기 팝업
*/
function fn_FindId(){
CmmPopup.open("<c:url value='/login/FindId_input_popup.do'/>", {}, {width: 500, height:300}, '아이디 찾기');
CmmPopup.open("<c:url value='/login/findIdPopup/input.do'/>", {}, {width: 500, height:300}, '아이디 찾기');
}
/**
* 비밀번호 찾기 팝업
*/
function fn_FindPw(){
CmmPopup.open("<c:url value='/login/FindPwd_input_popup.do'/>", {}, {width: 500, height:330}, '비밀번호 찾기');
CmmPopup.open("<c:url value='/login/findPwdPopup/input.do'/>", {}, {width: 500, height:330}, '비밀번호 찾기');
}
/**

@ -28,7 +28,7 @@
var activeForm = TabsUtil.activeForm();
var param = $(activeForm).serialize();
$.ajax({
url : "${ctx}/login/FindId_result_popup.do",
url : "${ctx}/login/findIdPopup/result.do",
data : param,
type : "post",
dataType : "html",
@ -37,7 +37,7 @@
jqXhr.setRequestHeader('AJAX',true);
},
success : function(data) {
$(activeForm).attr("action", "${ctx}/login/FindId_result_popup.do");
$(activeForm).attr("action", "${ctx}/login/findIdPopup/result.do");
$(activeForm).attr("method", "post");
$(activeForm).submit();
},
@ -274,4 +274,4 @@
</div>
<!-- //userSeTabs -->
</body>
</html>
</html>

@ -34,7 +34,7 @@
jqXhr.setRequestHeader('AJAX',true);
},
success : function(data) {
$("#findIdForm").attr("action", "${ctx}/login/FindId_result_popup.do");
$("#findIdForm").attr("action", "${ctx}/login/findIdPopup/result.do");
$("#findIdForm").attr("method", "post");
$("#findIdForm").submit();
},
@ -97,4 +97,4 @@
<!-- // findArea -->
</form>
</body>
</html>
</html>

@ -20,9 +20,9 @@
* 아이디 찾기
*/
function fn_FindId(){
var popUrl ="${ctx}/login/FindId_input_popup.do";
if(document.referrer.indexOf('FindId_inputEvr_popup.do')>-1)
popUrl = "${ctx}/login/FindId_inputEvr_popup.do";
var popUrl ="${ctx}/login/findIdPopup/input.do";
if(document.referrer.indexOf('findIdPopup/inputEvr.do')>-1)
popUrl = "${ctx}/login/findIdPopup/inputEvr.do";
var popOption = "width=500px, height=335px, resizable=no, location=no, top=100px, left100px;"
window.open(popUrl,"아이디 찾기",popOption);
@ -32,9 +32,9 @@
* 비밀번호 찾기
*/
function fn_FindPw(){
var popUrl = "${ctx}/login/FindPwd_input_popup.do";
if(document.referrer.indexOf('FindId_inputEvr_popup.do')>-1)
popUrl = "${ctx}/login/FindPwd_inputEvr_popup.do";
var popUrl = "${ctx}/login/findPwdPopup/input.do";
if(document.referrer.indexOf('findIdPopup/inputEvr.do')>-1)
popUrl = "${ctx}/login/findPwdPopup/inputEvr.do";
var popOption = "width=500px, height=380px, resizable=no, location=no, top=100px, left100px";
var target = '비밀번호 찾기';
@ -87,4 +87,4 @@
</body>
</html>
</html>
Loading…
Cancel
Save