Java Code Examples for com.ruoyi.system.domain.SysUser#setEmail()
The following examples show how to use
com.ruoyi.system.domain.SysUser#setEmail() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: SysProfileController.java From supplierShop with MIT License | 6 votes |
/** * 修改用户 */ @Log(title = "个人信息", businessType = BusinessType.UPDATE) @PostMapping("/update") @ResponseBody public AjaxResult update(SysUser user) { SysUser currentUser = ShiroUtils.getSysUser(); currentUser.setUserName(user.getUserName()); currentUser.setEmail(user.getEmail()); currentUser.setPhonenumber(user.getPhonenumber()); currentUser.setSex(user.getSex()); if (userService.updateUserInfo(currentUser) > 0) { ShiroUtils.setSysUser(userService.selectUserById(currentUser.getUserId())); return success(); } return error(); }
Example 2
Source File: SysProfileController.java From ruoyiplus with MIT License | 6 votes |
/** * 修改用户 */ @Log(title = "个人信息", businessType = BusinessType.UPDATE) @PostMapping("/update") @ResponseBody public AjaxResult update(SysUser user) { SysUser currentUser = getSysUser(); currentUser.setUserName(user.getUserName()); currentUser.setEmail(user.getEmail()); currentUser.setPhonenumber(user.getPhonenumber()); currentUser.setSex(user.getSex()); if (userService.updateUserInfo(currentUser) > 0) { setSysUser(userService.selectUserById(currentUser.getUserId())); return success(); } return error(); }