diff --git a/src/main/java/geoinfo/main/login/LoginController.java b/src/main/java/geoinfo/main/login/LoginController.java index 2286ace9..6ddb3a85 100644 --- a/src/main/java/geoinfo/main/login/LoginController.java +++ b/src/main/java/geoinfo/main/login/LoginController.java @@ -581,18 +581,9 @@ public class LoginController { // 로그인 @RequestMapping(value = "/login.do", method = RequestMethod.POST) - public ModelAndView login( - HttpSession session, - Map map, - HttpServletRequest request, - HttpServletResponse response, - @RequestParam("location") String location, - @RequestParam("login_param") String login_param, - @RequestParam("id") String id, - @RequestParam("pass") String pass) throws Exception { + public ModelAndView login(HttpSession session, Map map, HttpServletRequest request, HttpServletResponse response, @RequestParam("location") String location, @RequestParam("login_param") String login_param, @RequestParam("id") String id, @RequestParam("cls") String cls, @RequestParam("pass") String pass) throws Exception { ModelAndView mv = new ModelAndView("home/login"); - String cls = ""; String msg = ""; String url = ""; String sysdate = ""; @@ -648,6 +639,7 @@ public class LoginController { map.put("passwd", pass); map.put("passwd2", pass2); + map.put("cls", cls); boolean loginSuccess = false; String dup_id; @@ -705,6 +697,7 @@ public class LoginController { map.put("passwd", pass); map.put("passwd2", pass2); + map.put("cls", cls); selectWebMemberIn = loginService.selectWebMemberIn(map); if(selectWebMemberIn == null) { @@ -723,6 +716,7 @@ public class LoginController { }else { // 관리자일 경우 map.put("userid", userid); + map.put("cls", "9"); selectWebMemberIn = loginService.selectWebMemberIn(map); map.clear(); @@ -745,14 +739,11 @@ public class LoginController { cls = selectWebMemberIn.get("cls").toString(); if (!"".equals(request.getSession()) && !request.getSession().equals(null)) { - session = request.getSession(); - session.setAttribute("USERID", userid); - session.setAttribute("USERNAME", userName); - session.setAttribute("MASTERCODE", masterCode); - session.setAttribute("CLS", cls); - session.setAttribute("GOVECODE", goveCode); - session.setMaxInactiveInterval(43200); - + request.getSession().setAttribute("USERID", userid); + request.getSession().setAttribute("USERNAME", userName); + request.getSession().setAttribute("MASTERCODE", masterCode); + request.getSession().setAttribute("CLS", cls); + request.getSession().setAttribute("GOVECODE", goveCode); // 2017.10.13 dhlee 세션 ip , 환경 추가 InetAddress ip = InetAddress.getLocalHost(); @@ -770,6 +761,8 @@ public class LoginController { map.put("userid", userid); map.put("passwd", pass); map.put("passwd2", pass2); + map.put("cls", cls); + map.put("cls2", "2"); selectWebMemberIn = loginService.selectWebMemberIn(map); map.clear(); @@ -791,13 +784,11 @@ public class LoginController { cls = selectWebMemberIn.get("cls").toString(); goveCode = selectWebMemberIn.get("govement_code").toString(); - session = request.getSession(); - session.setAttribute("USERID", userid); - session.setAttribute("USERNAME", userName); - session.setAttribute("MASTERCODE", masterCode); - session.setAttribute("CLS", cls); - session.setAttribute("GOVECODE", goveCode); - session.setMaxInactiveInterval(43200); + request.getSession().setAttribute("USERID", userid); + request.getSession().setAttribute("USERNAME", userName); + request.getSession().setAttribute("MASTERCODE", masterCode); + request.getSession().setAttribute("CLS", cls); + request.getSession().setAttribute("GOVECODE", goveCode); // 2017.10.13 dhlee 세션 ip , 환경 추가 InetAddress ip = InetAddress.getLocalHost(); diff --git a/src/main/webapp/WEB-INF/views/home/include/header.jsp b/src/main/webapp/WEB-INF/views/home/include/header.jsp index 6a124f2f..89dd3e77 100644 --- a/src/main/webapp/WEB-INF/views/home/include/header.jsp +++ b/src/main/webapp/WEB-INF/views/home/include/header.jsp @@ -82,7 +82,7 @@ 공통 커스텀 ============================================================== --> - + @@ -139,7 +139,7 @@ document.documentElement.classList.add("ie"); } }); - + function gomypage() { top.location.href = "topMenuSelect.do?url=mypage_main"; } @@ -153,7 +153,7 @@ var comPopWin = window.open("information_info.do", "comPopWin", "title=no,toolbar=no,scrollbars=yes,width=718,height=800,left=50,top=50"); comPopWin.focus(); } - +