Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
I
ioc_sixiang_license
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
zengtianlai3
ioc_sixiang_license
Commits
abd449a7
Commit
abd449a7
authored
Feb 02, 2023
by
ma
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
改正歧义描述
parent
65490767
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
UserController.java
...n/java/iot/sixiang/license/controller/UserController.java
+3
-3
No files found.
license/src/main/java/iot/sixiang/license/controller/UserController.java
View file @
abd449a7
...
@@ -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
));
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment