Commit abd449a7 authored by ma's avatar ma

改正歧义描述

parent 65490767
...@@ -109,11 +109,11 @@ public class UserController { ...@@ -109,11 +109,11 @@ public class UserController {
User user = userService.getUserById(Integer.parseInt(userId)); User user = userService.getUserById(Integer.parseInt(userId));
List<UserPermission> userPermissions = userPermissionService.getPermissionById(user.getUserId()); List<UserPermission> userPermissions = userPermissionService.getPermissionById(user.getUserId());
if (!CommonUtil.checkPermission(userPermissions, 1)) { if (!CommonUtil.checkPermission(userPermissions, 1)) {
throw new IotLicenseException(403, "该用户无邀请用户注册权限!"); throw new IotLicenseException(403, "无邀请用户注册权限!");
} }
int level = user.getLevel(); int level = user.getLevel();
if (level >= 3 || level <= 0) { if (level >= 3 || level <= 0) {
return BaseResult.failed().setMsgValue("该等级账号不支持邀请注册用户"); return BaseResult.failed().setMsgValue("您的账号等级不支持邀请注册用户");
} }
boolean res = userService.addUser(userName, company, password, user.getUserId(), ++level); boolean res = userService.addUser(userName, company, password, user.getUserId(), ++level);
if (res) { if (res) {
...@@ -142,7 +142,7 @@ public class UserController { ...@@ -142,7 +142,7 @@ public class UserController {
} }
List<UserPermission> userPermissions = userPermissionService.getPermissionById(Integer.parseInt(curUserId)); List<UserPermission> userPermissions = userPermissionService.getPermissionById(Integer.parseInt(curUserId));
if (!CommonUtil.checkPermission(userPermissions, 2)) { if (!CommonUtil.checkPermission(userPermissions, 2)) {
throw new IotLicenseException(403, "该用户无删除用户权限!"); throw new IotLicenseException(403, "无删除用户权限!");
} }
boolean res = userService.deleteUser(Integer.parseInt(userId)); boolean res = userService.deleteUser(Integer.parseInt(userId));
userPermissionService.deleteUserPermission(Integer.parseInt(userId)); userPermissionService.deleteUserPermission(Integer.parseInt(userId));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment