2022-12-26 14:35 관리자 로그인 성능 개선
This commit is contained in:
parent
63b919a468
commit
0796a39da9
@ -538,21 +538,37 @@ public class EgovLoginController {
|
|||||||
loginVO.setPassword(loginVO.getPassword());
|
loginVO.setPassword(loginVO.getPassword());
|
||||||
|
|
||||||
// 사용자일 경우 로그인 안되게
|
// 사용자일 경우 로그인 안되게
|
||||||
if (null == loginService.getUserAuth(loginVO)) { // 아이디 없음.
|
LoginVO loginInfo = loginService.getUserAuth(loginVO);
|
||||||
|
String s_loginInfo_getAuthority = "";
|
||||||
|
try {
|
||||||
|
s_loginInfo_getAuthority = loginInfo.getAuthority();
|
||||||
|
|
||||||
|
}catch(Exception ex) {
|
||||||
|
System.out.println(ex.getMessage());
|
||||||
|
//ex.printStackTrace();
|
||||||
|
//System.out.println(ex.prin.printStackTrace());
|
||||||
|
}
|
||||||
|
|
||||||
|
//if (null == loginService.getUserAuth(loginVO)) { // 아이디 없음.
|
||||||
|
if (null == loginInfo) { // 아이디 없음.
|
||||||
// initRsa(request);
|
// initRsa(request);
|
||||||
model.addAttribute("message", egovMessageSource.getMessage("fail.common.login"));
|
model.addAttribute("message", egovMessageSource.getMessage("fail.common.login"));
|
||||||
return "uat/uia/EgovLoginUsr";
|
return "uat/uia/EgovLoginUsr";
|
||||||
} else {
|
} else {
|
||||||
if ("ROLE_USER_MEMBER".equals(loginService.getUserAuth(loginVO).getAuthority())) { // 일반사용자 로그인
|
//if ("ROLE_USER_MEMBER".equals(loginService.getUserAuth(loginVO).getAuthority())) { // 일반사용자 로그인
|
||||||
|
if ("ROLE_USER_MEMBER".equals(s_loginInfo_getAuthority)) { // 일반사용자 로그인
|
||||||
// initRsa(request);
|
// initRsa(request);
|
||||||
model.addAttribute("message", egovMessageSource.getMessage("fail.common.login"));
|
model.addAttribute("message", egovMessageSource.getMessage("fail.common.login"));
|
||||||
return "uat/uia/EgovLoginUsr";
|
return "uat/uia/EgovLoginUsr";
|
||||||
} else if ("ROLE_USER_MANAGER".equals(loginService.getUserAuth(loginVO).getAuthority())) {
|
//} else if ("ROLE_USER_MANAGER".equals(loginService.getUserAuth(loginVO).getAuthority())) {
|
||||||
|
} else if ("ROLE_USER_MANAGER".equals(s_loginInfo_getAuthority)) {
|
||||||
model.addAttribute("message", egovMessageSource.getMessage("fail.common.login"));
|
model.addAttribute("message", egovMessageSource.getMessage("fail.common.login"));
|
||||||
return "uat/uia/EgovLoginUsr";
|
return "uat/uia/EgovLoginUsr";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// 1. 로그인 처리
|
// 1. 로그인 처리
|
||||||
LoginVO resultVO = loginService.actionLogin(loginVO);
|
LoginVO resultVO = loginService.actionLogin(loginVO);
|
||||||
|
|
||||||
@ -607,9 +623,19 @@ public class EgovLoginController {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//중복 호출 제거
|
||||||
|
LoginVO loginGetUserAuth = loginService.getUserAuth(resultVO);
|
||||||
|
|
||||||
|
if (loginGetUserAuth != null) {
|
||||||
|
resultVO.setAuthority(loginGetUserAuth.getAuthority());
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
if (loginService.getUserAuth(resultVO) != null) {
|
if (loginService.getUserAuth(resultVO) != null) {
|
||||||
resultVO.setAuthority(loginService.getUserAuth(resultVO).getAuthority());
|
resultVO.setAuthority(loginService.getUserAuth(resultVO).getAuthority());
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
if (null == resultVO.getId()) { // 로그인 실패
|
if (null == resultVO.getId()) { // 로그인 실패
|
||||||
loginService.updatePassMissPlus(loginVO);
|
loginService.updatePassMissPlus(loginVO);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user