Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
device-new-platform
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
赵啸非
device-new-platform
Commits
c3a78c51
Commit
c3a78c51
authored
Aug 15, 2022
by
赵啸非
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改用户登录,权限分配等
parent
680c5f19
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
10 deletions
+10
-10
device-manager/src/main/java/com/mortals/xhx/base/system/user/service/impl/UserServiceImpl.java
...ls/xhx/base/system/user/service/impl/UserServiceImpl.java
+3
-0
device-manager/src/main/java/com/mortals/xhx/base/system/user/web/UserController.java
.../com/mortals/xhx/base/system/user/web/UserController.java
+7
-10
No files found.
device-manager/src/main/java/com/mortals/xhx/base/system/user/service/impl/UserServiceImpl.java
View file @
c3a78c51
...
@@ -75,6 +75,9 @@ public class UserServiceImpl extends AbstractCRUDServiceImpl<UserDao, UserEntity
...
@@ -75,6 +75,9 @@ public class UserServiceImpl extends AbstractCRUDServiceImpl<UserDao, UserEntity
@Override
@Override
protected
void
saveBefore
(
UserEntity
entity
,
Context
context
)
throws
AppException
{
protected
void
saveBefore
(
UserEntity
entity
,
Context
context
)
throws
AppException
{
if
(!
ObjectUtils
.
isEmpty
(
entity
.
getLoginName
())
&&
existUser
(
entity
.
getLoginName
(),
entity
.
getId
()))
{
throw
new
AppException
(
"登录名已存在!"
);
}
this
.
doHandlerUser
(
entity
);
this
.
doHandlerUser
(
entity
);
}
}
...
...
device-manager/src/main/java/com/mortals/xhx/base/system/user/web/UserController.java
View file @
c3a78c51
...
@@ -92,16 +92,13 @@ public class UserController extends BaseCRUDJsonBodyMappingController<UserServic
...
@@ -92,16 +92,13 @@ public class UserController extends BaseCRUDJsonBodyMappingController<UserServic
}
}
@Override
// @Override
protected
void
saveBefore
(
UserEntity
entity
,
Map
<
String
,
Object
>
model
,
Context
context
)
throws
AppException
{
// protected void saveBefore(UserEntity entity, Map<String, Object> model, Context context) throws AppException {
if
(
service
.
existUser
(
entity
.
getLoginName
(),
entity
.
getId
()))
{
// if (!ObjectUtils.isEmpty(entity.getLoginName()) && service.existUser(entity.getLoginName(), entity.getId())) {
throw
new
AppException
(
"登录名已存在!"
);
// throw new AppException("登录名已存在!");
}
// }
if
(!
ObjectUtils
.
isEmpty
(
entity
.
getLoginName
())
&&
service
.
existUser
(
entity
.
getLoginName
(),
entity
.
getId
()))
{
// super.saveBefore(entity, model, context);
throw
new
AppException
(
"登录名已存在!"
);
// }
}
super
.
saveBefore
(
entity
,
model
,
context
);
}
@RequestMapping
(
value
=
"change/password"
,
method
=
RequestMethod
.
POST
)
@RequestMapping
(
value
=
"change/password"
,
method
=
RequestMethod
.
POST
)
...
...
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