# Conflicts:
#	src/main/webapp/css/style.css
master
강석 최 2022-03-11 16:56:20 +09:00
commit 74263cf57d
5 changed files with 560 additions and 451 deletions

View File

@ -110,7 +110,7 @@ public class CommonController {
*/
@RequestMapping(value="/userIdCheck")
@ResponseBody
public String checkId(@RequestParam("checkId")String checkId) throws Exception {
public String userIdCheck(@RequestParam("checkId")String checkId) throws Exception {
try {
int cnt = userService.selectUserIdCheck(checkId);
if(cnt > 0) {
@ -177,24 +177,19 @@ public class CommonController {
}
// 아이디 찾기 페이지 이동
@RequestMapping(value = "findId")
public String findIdView(){
return "anonymous/html/findId";
}
public String findIdView(){ return "anonymous/html/findId"; }
// 아이디 찾기 실행
@RequestMapping(value = "findId", method = RequestMethod.POST)
public String findIdAction(UserVO userVO, Model model) {
UserVO user = userService.findId(userVO);
@RequestMapping(value = "searchUserInfo")
@ResponseBody
public String searchUserInfo(UserVO userVO) {
userVO = userService.findId(userVO);
if (user == null) {
model.addAttribute("check", 1);
} else {
model.addAttribute("check", 2);
model.addAttribute("id", user.getUserid());
if (userVO == null ) {
return "userNull";
}
return "anonymous/html/findId";
return userVO.getUserid();
}
//pw찾기 페이지 이동

View File

@ -140,9 +140,12 @@
WHERE userid = #{userid}
</update>
<!--아이디 비밀번호찾기-->
<!--아이디 비밀번호 찾기-->
<select id="findId" resultType="userVO">
select * from t_user where name=#{name} and phonenum=#{phonenum}
select userid
from t_user
where
name=#{name} and company=#{company} and email=#{email}
</select>
<select id="findPwd" resultType="userVO">

View File

@ -42,7 +42,6 @@
</tr>
</tbody>
</table>
<table class="detail_table">
<tbody>
<tr>
@ -140,6 +139,7 @@
</tbody>
</table>
</div>
<c:choose>
<c:when test="${useRequestVO.status eq '99'}">
<table class="detail_table" style="margin-right: 1em">

View File

@ -3,3 +3,83 @@
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%@ taglib prefix="ui" uri="http://egovframework.gov/ctl/ui" %>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
<script type="text/javascript">
$(document).on('click', '#checkId', function (){
checkId();
})
function checkId(){
if(inputCheck()){
$.ajax({
url: "/searchUserInfo",
type: "GET",
data: {
name: $("#username").val(),
company: $("#company").val(),
email: $("#email").val()
},
success: function (result) {
checkIdAfter(result)
},
error: function (request, status, error) {
alert("가입정보가 일치 하지 않습니다.\n 관리자에게 문의해주세요.");
}
});
}
}
function inputCheck(){
if(!$("#username").val()){
alert("이름을 입력해주세요.")
return false;
}
if(!$("#company").val()){
alert("회사명을 입력해주세요.")
return false;
}
if(!$("#email").val()){
alert("이메일을 입력해주세요.")
return false;
}
return true;
}
function checkIdAfter(result) {
if(result==="userNull"){
alert("입력된 가입 정보가 없습니다.")
}else{
alert("해당 정보로 가입된 ID는 "+result+" 입니다.")
}
}
</script>
<div class="row justify-content-end">
<div class="col-12 row m-1">
<label for="username" class="col-4 text-end">이름</label>
<div class="col-8">
<input type="text" class="form-control" id="username">
</div>
</div>
<div class="col-12 row m-1">
<label for="username" class="col-4 text-end">회사명</label>
<div class="col-8">
<input type="text" class="form-control" id="company">
</div>
</div>
<div class="col-12 row m-1">
<label for="username" class="col-4 text-end">email</label>
<div class="col-8">
<input type="email" class="form-control" id="email">
</div>
</div>
<div class="col-8">
<button type="button" id="checkId" class="btn btn-primary m-3">가입정보 확인</button>
</div>
</div>

File diff suppressed because it is too large Load Diff