feat: 비밀번호 찾기 오류 수정 건
parent
71754b3c94
commit
0f164cf739
3
pom.xml
3
pom.xml
|
|
@ -983,6 +983,7 @@
|
||||||
<version>1.0.0</version>
|
<version>1.0.0</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
<!-- ▼▼▼ 세션을 Redis에 저장 ▼▼▼ -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springframework.session</groupId>
|
<groupId>org.springframework.session</groupId>
|
||||||
<artifactId>spring-session-data-redis</artifactId>
|
<artifactId>spring-session-data-redis</artifactId>
|
||||||
|
|
@ -1006,7 +1007,7 @@
|
||||||
<artifactId>jedis</artifactId>
|
<artifactId>jedis</artifactId>
|
||||||
<version>2.8.2</version>
|
<version>2.8.2</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<!-- ▲▲▲ 세션을 Redis에 저장 ▲▲▲ -->
|
||||||
|
|
||||||
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
|
||||||
|
|
@ -332,19 +332,33 @@ public class LoginController {
|
||||||
map.put("name", name);
|
map.put("name", name);
|
||||||
|
|
||||||
Map<String, Object> result = loginService.selectSearchPass(map);
|
Map<String, Object> result = loginService.selectSearchPass(map);
|
||||||
Map<String, Object> resultByUserIdOrEmail = loginService.selectSearchPassByUserIdOrEmail(map);
|
ArrayList<Map<String, Object>> resultByUserIdOrEmailList = loginService.selectSearchPassByUserIdOrEmail(map);
|
||||||
map.put("DI", DI);
|
|
||||||
Map<String, Object> resultByDupinfo = loginService.selectSearchPassByDupinfo(map);
|
|
||||||
|
|
||||||
if (result == null && resultByUserIdOrEmail == null) {
|
if( resultByUserIdOrEmailList.size() == 0 ) {
|
||||||
mv.setViewName("body/account/pwNotFind");
|
mv.setViewName("body/account/pwNotFind");
|
||||||
mv.addObject("msg", name + "님의 아이디는 등록되어있지 않습니다.");
|
mv.addObject("msg", name + "님의 아이디는 등록되어있지 않습니다. '개인' 또는 '기업' 사용자 체크 부분도 확인바랍니다.");
|
||||||
} else if (result == null && resultByUserIdOrEmail != null) {
|
return mv;
|
||||||
|
}
|
||||||
|
Map<String, Object> resultByUserIdOrEmail = resultByUserIdOrEmailList.get(0);
|
||||||
|
map.put("DI", DI);
|
||||||
|
|
||||||
|
ArrayList<Map<String, Object>> resultByDupinfoList = loginService.selectSearchPassByDupinfo(map);
|
||||||
|
|
||||||
|
if( resultByDupinfoList.size() == 0 ) {
|
||||||
|
mv.setViewName("body/account/pwNotFind");
|
||||||
|
mv.addObject("msg", name + "님의 모마일 인증으로 가입된 계정이 존재하지 않습니다.");
|
||||||
|
return mv;
|
||||||
|
}
|
||||||
|
Map<String, Object> resultByDupinfo = resultByDupinfoList.get(0);
|
||||||
|
|
||||||
|
if (result == null && resultByUserIdOrEmail != null) {
|
||||||
mv.setViewName("body/account/pwNotFind");
|
mv.setViewName("body/account/pwNotFind");
|
||||||
mv.addObject("msg", name + "님의 아이디 또는 이메일이 등록되어있지 않습니다.");
|
mv.addObject("msg", name + "님의 아이디 또는 이메일이 등록되어있지 않습니다.");
|
||||||
|
return mv;
|
||||||
} else if (result == null && resultByDupinfo != null) {
|
} else if (result == null && resultByDupinfo != null) {
|
||||||
mv.setViewName("body/account/pwNotFind");
|
mv.setViewName("body/account/pwNotFind");
|
||||||
mv.addObject("msg", name + "님의 아이디 또는 이메일이 등록되어있지 않습니다..");
|
mv.addObject("msg", name + "님의 아이디 또는 이메일이 등록되어있지 않습니다..");
|
||||||
|
return mv;
|
||||||
} else {
|
} else {
|
||||||
mv.setViewName("body/account/pass_post");
|
mv.setViewName("body/account/pass_post");
|
||||||
mv.addObject("hdnCertNum",hdnCertNum);
|
mv.addObject("hdnCertNum",hdnCertNum);
|
||||||
|
|
@ -352,28 +366,9 @@ public class LoginController {
|
||||||
mv.addObject("userId", userId);
|
mv.addObject("userId", userId);
|
||||||
mv.addObject("name", name);
|
mv.addObject("name", name);
|
||||||
mv.addObject("cls", cls);
|
mv.addObject("cls", cls);
|
||||||
}
|
|
||||||
|
|
||||||
/*if (result != null) {
|
|
||||||
mv.addObject("username", result.get("user_name"));
|
|
||||||
mv.addObject("userid", result.get("userid"));
|
|
||||||
mv.addObject("datetime", result.get("datetime"));
|
|
||||||
mv.addObject("passwd", result.get("passwd"));
|
|
||||||
|
|
||||||
SecureRandom r = new SecureRandom();
|
|
||||||
int l = r.nextInt(1000000000);
|
|
||||||
String newPass = Integer.toString(l);
|
|
||||||
System.out.println("rand===" + newPass);
|
|
||||||
|
|
||||||
mv.addObject("script", "<script>newPassj = hex_sha256('" + newPass + "').substring(0,20);</script>" + "<input type=hidden name='newPass' value=" + GeoinfoCommon.parseData(newPass) + ">" + "<input type=hidden name='newPassj' value=''>" + "<input type=hidden name='useridq' value=" + GeoinfoCommon.parseData(result.get("userid").toString()) + ">" + "<input type=hidden name='clsq' value=" + GeoinfoCommon.parseData(result.get("cls").toString()) + ">"
|
|
||||||
+ "<input type=hidden name='userNameq' value=" + GeoinfoCommon.parseData(result.get("user_name").toString()) + ">" + "<script>document.passSearch.newPassj.value = newPassj;document.passSearch.submit();</script>");
|
|
||||||
|
|
||||||
} else {
|
|
||||||
mv.setViewName("body/account/pwNotFind");
|
|
||||||
mv.addObject("msg", name + "님의 아이디는 등록되어있지 않습니다.");
|
|
||||||
}*/
|
|
||||||
return mv;
|
return mv;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@RequestMapping(value = "/searchPassch.do")
|
@RequestMapping(value = "/searchPassch.do")
|
||||||
public ModelAndView searchPassch(Map<String, Object> map, HttpServletRequest request,
|
public ModelAndView searchPassch(Map<String, Object> map, HttpServletRequest request,
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
package geoinfo.main.login.service;
|
package geoinfo.main.login.service;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
@ -30,8 +31,8 @@ public interface LoginMapper {
|
||||||
|
|
||||||
|
|
||||||
Map<String, Object> selectSearchPass(Map<String, Object> map);
|
Map<String, Object> selectSearchPass(Map<String, Object> map);
|
||||||
Map<String, Object> selectSearchPassByUserIdOrEmail(Map<String, Object> map);
|
ArrayList<Map<String, Object>> selectSearchPassByUserIdOrEmail(Map<String, Object> map);
|
||||||
Map<String, Object> selectSearchPassByDupinfo(Map<String, Object> map);
|
ArrayList<Map<String, Object>> selectSearchPassByDupinfo(Map<String, Object> map);
|
||||||
|
|
||||||
|
|
||||||
void updateSearchPassch(Map<String, Object> map);
|
void updateSearchPassch(Map<String, Object> map);
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
package geoinfo.main.login.service;
|
package geoinfo.main.login.service;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
@ -22,8 +23,8 @@ public interface LoginService {
|
||||||
Map<String, Object> selectSearchId(Map<String, Object> map) throws Exception;
|
Map<String, Object> selectSearchId(Map<String, Object> map) throws Exception;
|
||||||
Map<String, Object> selectSearchIdByNameAndPhoneAndDupinfoIsNullAndCertificationYnFalse(Map<String, Object> map) throws Exception;
|
Map<String, Object> selectSearchIdByNameAndPhoneAndDupinfoIsNullAndCertificationYnFalse(Map<String, Object> map) throws Exception;
|
||||||
Map<String, Object> selectSearchPass(Map<String, Object> map) throws Exception;
|
Map<String, Object> selectSearchPass(Map<String, Object> map) throws Exception;
|
||||||
Map<String, Object> selectSearchPassByUserIdOrEmail(Map<String, Object> map) throws Exception;
|
ArrayList<Map<String, Object>> selectSearchPassByUserIdOrEmail(Map<String, Object> map) throws Exception;
|
||||||
Map<String, Object> selectSearchPassByDupinfo(Map<String, Object> map) throws Exception;
|
ArrayList<Map<String, Object>> selectSearchPassByDupinfo(Map<String, Object> map) throws Exception;
|
||||||
void updateSearchPassch(Map<String, Object> map) throws Exception;
|
void updateSearchPassch(Map<String, Object> map) throws Exception;
|
||||||
int selectWebDownLoadLog(Map<String, Object> map);
|
int selectWebDownLoadLog(Map<String, Object> map);
|
||||||
List<Map<String, Object>> selectDownLoadContent(Map<String, Object> map);
|
List<Map<String, Object>> selectDownLoadContent(Map<String, Object> map);
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,7 @@ import geoinfo.util.FileUtil;
|
||||||
|
|
||||||
import java.io.FileNotFoundException;
|
import java.io.FileNotFoundException;
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
|
import java.util.ArrayList;
|
||||||
import java.util.Calendar;
|
import java.util.Calendar;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
|
@ -86,12 +87,12 @@ public class LoginServiceImpl implements LoginService{
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Map<String, Object> selectSearchPassByUserIdOrEmail(Map<String, Object> map) throws Exception {
|
public ArrayList<Map<String, Object>> selectSearchPassByUserIdOrEmail(Map<String, Object> map) throws Exception {
|
||||||
return loginMapper.selectSearchPassByUserIdOrEmail(map);
|
return loginMapper.selectSearchPassByUserIdOrEmail(map);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Map<String, Object> selectSearchPassByDupinfo(Map<String, Object> map) throws Exception {
|
public ArrayList<Map<String, Object>> selectSearchPassByDupinfo(Map<String, Object> map) throws Exception {
|
||||||
return loginMapper.selectSearchPassByDupinfo(map);
|
return loginMapper.selectSearchPassByDupinfo(map);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -187,8 +187,11 @@
|
||||||
SELECT CLS, USER_NAME, USERID, PASSWD, TO_CHAR(DATETIME,'YYYY-MM-DD') DATETIME, CERTIFICATION_YN
|
SELECT CLS, USER_NAME, USERID, PASSWD, TO_CHAR(DATETIME,'YYYY-MM-DD') DATETIME, CERTIFICATION_YN
|
||||||
FROM WEB_MEMBER_IN
|
FROM WEB_MEMBER_IN
|
||||||
WHERE
|
WHERE
|
||||||
|
TRIM(CLS) = TRIM(#{cls}) AND
|
||||||
|
(
|
||||||
TRIM(USERID) = TRIM(#{userId}) OR
|
TRIM(USERID) = TRIM(#{userId}) OR
|
||||||
TRIM(EMAIL) = TRIM(#{email})
|
TRIM(EMAIL) = TRIM(#{email})
|
||||||
|
)
|
||||||
]]>
|
]]>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -274,7 +274,7 @@ if (request.getSession().getAttribute("CLS") == null || "2".equals(request.getSe
|
||||||
*/
|
*/
|
||||||
function handleRowClick(p_code) {
|
function handleRowClick(p_code) {
|
||||||
if (!isDragging) {
|
if (!isDragging) {
|
||||||
openMapLoc(p_code);
|
onClickBtnViewOnMap(p_code);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
function onClickBtnViewOnMap() {
|
function onClickBtnViewOnMap(pCode = null) {
|
||||||
const projectMasterCompanyName = '${mbr.projectMasterCompanyName}';
|
const projectMasterCompanyName = '${mbr.projectMasterCompanyName}';
|
||||||
let projectCode = '${mbr.ProjectCode}';
|
let projectCode = '${mbr.ProjectCode}';
|
||||||
|
|
||||||
|
|
@ -17,24 +17,24 @@ function onClickBtnViewOnMap() {
|
||||||
const lastTeamName = document.getElementById('last-team-name').value;
|
const lastTeamName = document.getElementById('last-team-name').value;
|
||||||
const masterCompanyCode = document.getElementById('master-company-code').value;
|
const masterCompanyCode = document.getElementById('master-company-code').value;
|
||||||
|
|
||||||
openMap('${sessionScope.USERID}','${cls}', gl, gm, gs, gf, lastTeamName, projectMasterCompanyName, maxX-minX, maxY-minY, masterCompanyCode);
|
openMap('${sessionScope.USERID}','${cls}', gl, gm, gs, gf, lastTeamName, projectMasterCompanyName, maxX-minX, maxY-minY, masterCompanyCode, pCode);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function openMap(userid,cls, gl = null, gm = null, gs = null, gf = null, lastTeamName = null, projectMasterCompanyName = null, positionX= null, positionY= null, masterCompanyCode=null)
|
function openMap(userid,cls, gl = null, gm = null, gs = null, gf = null, lastTeamName = null, projectMasterCompanyName = null, positionX= null, positionY= null, masterCompanyCode=null, pCode=null)
|
||||||
{
|
{
|
||||||
win = 'map';
|
win = 'map';
|
||||||
sizeX=window.screen.width;
|
sizeX=window.screen.width;
|
||||||
sizeY=window.screen.height;
|
sizeY=window.screen.height;
|
||||||
|
|
||||||
let userArea = projectMasterCompanyName;
|
let userArea = projectMasterCompanyName;
|
||||||
if( userArea == null ) {
|
let mapWin = null;
|
||||||
if( userid === 't3-1' ) {
|
const url_base = "/map/mapMain.do?";
|
||||||
userArea = "충청남도";
|
let url = "userArea=" + encodeURIComponent(userArea) + "&gl=" + gl + "&gm=" + gm + "&gs=" + gs + "&gf=" + gf + "&lastTeamName=" + lastTeamName + "&masterCompanyCode=" + masterCompanyCode + "&positionX=" + positionX + "&positionY=" + positionY + "#tab_1_1";
|
||||||
} else if( userid === 't3-2' ) {
|
if( pCode ) {
|
||||||
userArea = "부산광역시";
|
url = "pcode=" + pCode + "&" + url;
|
||||||
}
|
}
|
||||||
}
|
mapWin = window.open(url_base + url,"mapWin","toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=yes,resizable=yes,width=" + sizeX + ",height=" + sizeY + ",left=0,top=0");
|
||||||
var mapWin = window.open("/map/mapMain.do?userArea=" + encodeURIComponent(userArea) + "&gl=" + gl + "&gm=" + gm + "&gs=" + gs + "&gf=" + gf + "&lastTeamName=" + lastTeamName + "&masterCompanyCode=" + masterCompanyCode + "&positionX=" + positionX + "&positionY=" + positionY + "#tab_1_1","mapWin","toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=yes,resizable=yes,width=" + sizeX + ",height=" + sizeY + ",left=0,top=0");
|
|
||||||
mapWin.focus();
|
mapWin.focus();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue