diff --git a/src/main/java/com/yingjun/ssm/web/FindPwdController.java b/src/main/java/com/yingjun/ssm/web/FindPwdController.java new file mode 100644 index 0000000000000000000000000000000000000000..0f62be1956ac5c80e1ccc29a1bf63fc33b9b5e8a --- /dev/null +++ b/src/main/java/com/yingjun/ssm/web/FindPwdController.java @@ -0,0 +1,60 @@ +package com.yingjun.ssm.web; + + +import com.google.gson.Gson; +import com.yingjun.ssm.dto.BaseResult; +import com.yingjun.ssm.entity.User; +import com.yingjun.ssm.enums.ResultEnum; +import com.yingjun.ssm.exception.BizException; +import com.yingjun.ssm.service.UserService; +import com.yingjun.ssm.util.CodeUtil; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Controller; +import org.springframework.ui.Model; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.ResponseBody; + +import javax.servlet.http.HttpSession; + + +/** + * 忘记密码找回密码 + * @author liyunfeng + */ +@Controller +@RequestMapping("/find") +public class FindPwdController { + + private final Logger LOG = LoggerFactory.getLogger(this.getClass()); + @Autowired + private UserService userService; + /** + * 到达用户登录页面 + * @return + */ + @RequestMapping(value = "/toFindPwd") + public String toFindPwd() { + return "/user/findPwd"; + } + + /** + * 找回密码 + * @return + */ + @ResponseBody + @RequestMapping(value = "/findPwd",produces = {"application/json;charset=UTF-8"}) + public BaseResult userLogin() { + try { + + } catch (BizException e) { + return new BaseResult<>(false, e.getMessage()); + } catch (Exception e) { + return new BaseResult<>(false, ResultEnum.INVALID_USER.getMsg()); + } + return new BaseResult<>(true, "登陆成功"); + } +} diff --git a/src/main/webapp/WEB-INF/jsp/user/findPwd.jsp b/src/main/webapp/WEB-INF/jsp/user/findPwd.jsp index 18c041cb9d864601fbeaffd96889c9dc56430eee..e3419e8c90a4bca09cb814bbf133a813f6c90d9b 100644 --- a/src/main/webapp/WEB-INF/jsp/user/findPwd.jsp +++ b/src/main/webapp/WEB-INF/jsp/user/findPwd.jsp @@ -4,23 +4,23 @@ 个人中心-找回密码 - + - - - - - - - - - + + + + + + + + +
- +
@@ -47,8 +47,8 @@