diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysUserController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysUserController.java
index 14533c841..5b53dd1c0 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysUserController.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysUserController.java
@@ -12,6 +12,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.multipart.MultipartFile;
import com.ruoyi.common.annotation.Log;
+import com.ruoyi.common.constant.UserConstants;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.page.TableDataInfo;
@@ -122,6 +123,10 @@ public class SysUserController extends BaseController
{
return error("不允许修改超级管理员用户");
}
+ if (UserConstants.USER_NAME_NOT_UNIQUE.equals(userService.checkLoginNameUnique(user.getLoginName())))
+ {
+ return error("保存用户'" + user.getLoginName() + "'失败,登录账号已存在");
+ }
user.setSalt(ShiroUtils.randomSalt());
user.setPassword(passwordService.encryptPassword(user.getLoginName(), user.getPassword(), user.getSalt()));
user.setCreateBy(ShiroUtils.getLoginName());
diff --git a/ruoyi-admin/src/main/resources/templates/system/menu/edit.html b/ruoyi-admin/src/main/resources/templates/system/menu/edit.html
index d6dc9d724..c7fc244bf 100644
--- a/ruoyi-admin/src/main/resources/templates/system/menu/edit.html
+++ b/ruoyi-admin/src/main/resources/templates/system/menu/edit.html
@@ -50,7 +50,7 @@
- 控制器中定义的权限标识,如:@RequiresPermissions("")
+ 控制器中定义的权限标识,如:@RequiresPermissions("")
@@ -35,7 +35,7 @@
@@ -43,7 +43,7 @@
@@ -53,7 +53,7 @@
@@ -61,7 +61,7 @@
@@ -121,7 +121,7 @@
diff --git a/ruoyi-admin/src/main/resources/templates/system/user/edit.html b/ruoyi-admin/src/main/resources/templates/system/user/edit.html
index 8fd1a5743..c2857f1c8 100644
--- a/ruoyi-admin/src/main/resources/templates/system/user/edit.html
+++ b/ruoyi-admin/src/main/resources/templates/system/user/edit.html
@@ -15,7 +15,7 @@
@@ -36,7 +36,7 @@
@@ -44,7 +44,7 @@
@@ -112,7 +112,7 @@
diff --git a/ruoyi-admin/src/main/resources/templates/system/user/profile/profile.html b/ruoyi-admin/src/main/resources/templates/system/user/profile/profile.html
index 3a0ea2706..2ba2fd1ad 100644
--- a/ruoyi-admin/src/main/resources/templates/system/user/profile/profile.html
+++ b/ruoyi-admin/src/main/resources/templates/system/user/profile/profile.html
@@ -64,19 +64,19 @@
diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/AjaxResult.java b/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/AjaxResult.java
index 2c9d72108..5463547aa 100644
--- a/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/AjaxResult.java
+++ b/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/AjaxResult.java
@@ -232,9 +232,11 @@ public class AjaxResult extends HashMap
}
@Override
- public String toString()
- {
- return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE).append("code", getCode())
- .append("msg", getMsg()).append("data", getData()).toString();
+ public String toString() {
+ return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+ .append("code", getCode())
+ .append("msg", getMsg())
+ .append("data", getData())
+ .toString();
}
}
diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysUserServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysUserServiceImpl.java
index 2d76cae20..36299f998 100644
--- a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysUserServiceImpl.java
+++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysUserServiceImpl.java
@@ -293,7 +293,7 @@ public class SysUserServiceImpl implements ISysUserService
}
/**
- * 校验用户名称是否唯一
+ * 校验登录名称是否唯一
*
* @param loginName 用户名
* @return