parent
ba0404f20f
commit
f4526c195d
|
|
@ -9,7 +9,6 @@
|
|||
FROM WEB_DUP_MEMBER
|
||||
WHERE
|
||||
TRIM(USERID) = #{userid}
|
||||
AND CLS = #{cls}
|
||||
AND (PASSWD = #{passwd} or PASSWD = #{passwd2})
|
||||
AND USERID NOT IN (
|
||||
SELECT USERID
|
||||
|
|
@ -31,18 +30,6 @@
|
|||
<if test="passwd != null">
|
||||
<![CDATA[ AND (PASSWD = #{passwd} or PASSWD = #{passwd2})]]>
|
||||
</if>
|
||||
<if test="cls != null">
|
||||
<![CDATA[ AND (CLS = #{cls}]]>
|
||||
|
||||
<if test="cls2 != null">
|
||||
<if test="cls2 == 2">
|
||||
<![CDATA[ OR CLS = '2') ]]>
|
||||
</if>
|
||||
</if>
|
||||
<if test="cls2 == null">
|
||||
<![CDATA[ ) ]]>
|
||||
</if>
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="checkWebMemberIn" parameterType="HashMap" resultType="int">
|
||||
|
|
|
|||
|
|
@ -581,9 +581,18 @@ public class LoginController {
|
|||
|
||||
// 로그인
|
||||
@RequestMapping(value = "/login.do", method = RequestMethod.POST)
|
||||
public ModelAndView login(HttpSession session, Map<String, Object> 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 {
|
||||
public ModelAndView login(
|
||||
HttpSession session,
|
||||
Map<String, Object> 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 {
|
||||
|
||||
ModelAndView mv = new ModelAndView("home/login");
|
||||
String cls = "";
|
||||
String msg = "";
|
||||
String url = "";
|
||||
String sysdate = "";
|
||||
|
|
@ -639,7 +648,6 @@ public class LoginController {
|
|||
|
||||
map.put("passwd", pass);
|
||||
map.put("passwd2", pass2);
|
||||
map.put("cls", cls);
|
||||
|
||||
boolean loginSuccess = false;
|
||||
String dup_id;
|
||||
|
|
@ -697,7 +705,6 @@ public class LoginController {
|
|||
|
||||
map.put("passwd", pass);
|
||||
map.put("passwd2", pass2);
|
||||
map.put("cls", cls);
|
||||
selectWebMemberIn = loginService.selectWebMemberIn(map);
|
||||
if(selectWebMemberIn == null) {
|
||||
|
||||
|
|
@ -716,7 +723,6 @@ public class LoginController {
|
|||
}else {
|
||||
// 관리자일 경우
|
||||
map.put("userid", userid);
|
||||
map.put("cls", "9");
|
||||
selectWebMemberIn = loginService.selectWebMemberIn(map);
|
||||
map.clear();
|
||||
|
||||
|
|
@ -739,11 +745,14 @@ public class LoginController {
|
|||
cls = selectWebMemberIn.get("cls").toString();
|
||||
|
||||
if (!"".equals(request.getSession()) && !request.getSession().equals(null)) {
|
||||
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);
|
||||
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);
|
||||
|
||||
|
||||
// 2017.10.13 dhlee 세션 ip , 환경 추가
|
||||
InetAddress ip = InetAddress.getLocalHost();
|
||||
|
|
@ -761,8 +770,6 @@ 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();
|
||||
|
||||
|
|
@ -784,11 +791,13 @@ public class LoginController {
|
|||
cls = selectWebMemberIn.get("cls").toString();
|
||||
goveCode = selectWebMemberIn.get("govement_code").toString();
|
||||
|
||||
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);
|
||||
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);
|
||||
|
||||
// 2017.10.13 dhlee 세션 ip , 환경 추가
|
||||
InetAddress ip = InetAddress.getLocalHost();
|
||||
|
|
|
|||
|
|
@ -116,10 +116,7 @@
|
|||
}
|
||||
|
||||
function login(){
|
||||
if(document.login.cls[0].checked == false && document.login.cls[1].checked == false && document.login.cls[2].checked == false){
|
||||
alert("회원 유형을 선택하여 주십시요");
|
||||
return true;
|
||||
}else if (document.login.id.value == ""){
|
||||
if (document.login.id.value == ""){
|
||||
alert('아이디를 입력하여 주시기 바랍니다.');
|
||||
document.login.id.focus();
|
||||
return true;
|
||||
|
|
@ -164,22 +161,6 @@
|
|||
<input type="hidden" name="login_param" value="">
|
||||
|
||||
<h1 class="contents-title"><span class="contents-title-text">로그인</span></h1>
|
||||
<div class="contents-row t-center padT20">
|
||||
<div class="gg-radio-inline login-radio">
|
||||
<label class="gg-radio gg-radio-outline">
|
||||
<input type="radio" name="cls" value="0" checked /> 개인
|
||||
<span></span>
|
||||
</label>
|
||||
<label class="gg-radio gg-radio-outline">
|
||||
<input type="radio" name="cls" value="1" /> 기업
|
||||
<span></span>
|
||||
</label>
|
||||
<label class="gg-radio gg-radio-outline">
|
||||
<input type="radio" name="cls" value="3" /> 지자체
|
||||
<span></span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="contents-row padT20">
|
||||
<label for="id" class="control-label marR5">아이디</label>
|
||||
<input name="id" id="id" type="text" tabIndex="1" class="gg-input" maxlength="15" placeholder="아이디">
|
||||
|
|
|
|||
Loading…
Reference in New Issue