diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysProfileController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysProfileController.java index 2d7f42f9..cd8abd6f 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysProfileController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysProfileController.java @@ -67,11 +67,11 @@ public class SysProfileController extends BaseController currentUser.setSex(user.getSex()); if (StringUtils.isNotEmpty(user.getPhonenumber()) && !userService.checkPhoneUnique(currentUser)) { - return error("修改用户'" + user.getUserName() + "'失败,手机号码已存在"); + return error("修改用户'" + loginUser.getUsername() + "'失败,手机号码已存在"); } if (StringUtils.isNotEmpty(user.getEmail()) && !userService.checkEmailUnique(currentUser)) { - return error("修改用户'" + user.getUserName() + "'失败,邮箱账号已存在"); + return error("修改用户'" + loginUser.getUsername() + "'失败,邮箱账号已存在"); } if (userService.updateUserProfile(currentUser) > 0) { diff --git a/ruoyi-ui/src/views/system/user/profile/userInfo.vue b/ruoyi-ui/src/views/system/user/profile/userInfo.vue index a40d8f60..df334599 100644 --- a/ruoyi-ui/src/views/system/user/profile/userInfo.vue +++ b/ruoyi-ui/src/views/system/user/profile/userInfo.vue @@ -1,16 +1,16 @@