/** * 获取用户信息 ById * * @return */ @RequestMapping("/user/getUserInfo/{id}") public String getUserInfo(Model model, @PathVariable("id") Long id) { try { User user = userService.getUserById(id); model.addAttribute("user", user); } catch (Exception e) { logger.error("getUserInfo:" + e); } return "路径"; }
/** * 跳转到修改密码 * * @return */ @RequestMapping("/user/toupdatepwd/{id}") public ModelAndView toUpdatePwd(@PathVariable("id") Long id) { ModelAndView modelAndView = new ModelAndView(); modelAndView.setViewName(toUpdatePwd); try { User user = userService.getUserById(id); modelAndView.addObject("user", user); } catch (Exception e) { logger.error("AdminUserController.toUpdatePwd", e); } return modelAndView; }