Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
smart_gov_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
赵啸非
smart_gov_platform
Commits
5cf9633b
Commit
5cf9633b
authored
Jun 07, 2022
by
赵啸非
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改用户列表查询
parent
bb9ec0e5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
2 deletions
+26
-2
portal-manager/src/main/java/com/mortals/xhx/module/user/service/impl/UserServiceImpl.java
...mortals/xhx/module/user/service/impl/UserServiceImpl.java
+26
-2
No files found.
portal-manager/src/main/java/com/mortals/xhx/module/user/service/impl/UserServiceImpl.java
View file @
5cf9633b
...
...
@@ -48,7 +48,7 @@ public class UserServiceImpl extends AbstractCRUDServiceImpl<UserDao, UserEntity
private
RoleService
roleService
;
@Override
/*
@Override
protected void findAfter(UserEntity entity, PageInfo pageInfo, Context context, List<UserEntity> list) throws AppException {
Map<Long, String> roleMap = roleService.find(new RoleQuery()).stream().collect(Collectors.toMap(x -> x.getId(), y -> y.getName()));
List<Long> userIdList = list.stream().map(item -> item.getId()).collect(Collectors.toList());
...
...
@@ -62,7 +62,7 @@ public class UserServiceImpl extends AbstractCRUDServiceImpl<UserDao, UserEntity
}
});
super.findAfter(entity, pageInfo, context, list);
}
}
*/
private
void
doHandlerUser
(
UserEntity
entity
)
throws
AppException
{
if
(
StringUtils
.
isNotEmpty
(
entity
.
getLoginPwd
()))
{
...
...
@@ -79,6 +79,9 @@ public class UserServiceImpl extends AbstractCRUDServiceImpl<UserDao, UserEntity
}
else
{
entity
.
setUserType
(
UserType
.
CUSTOMER
.
getValue
());
}
}
@Override
...
...
@@ -92,6 +95,12 @@ public class UserServiceImpl extends AbstractCRUDServiceImpl<UserDao, UserEntity
throw
new
AppException
(
"你没有权限执行该操作"
);
}
this
.
doHandlerUser
(
entity
);
if
(!
ObjectUtils
.
isEmpty
(
entity
.
getRoleId
())){
RoleUserQuery
roleUserQuery
=
new
RoleUserQuery
();
roleUserQuery
.
setUserId
(
entity
.
getId
());
roleUserQuery
.
setRoleIdList
(
Arrays
.
asList
(
Long
.
parseLong
(
entity
.
getRoleId
())));
roleUserService
.
assignRoleToUser
(
roleUserQuery
);
}
}
...
...
@@ -194,4 +203,19 @@ public class UserServiceImpl extends AbstractCRUDServiceImpl<UserDao, UserEntity
}
@Override
protected
void
saveAfter
(
UserEntity
entity
,
Context
context
)
throws
AppException
{
super
.
saveAfter
(
entity
,
context
);
if
(!
ObjectUtils
.
isEmpty
(
entity
.
getRoleId
())){
RoleUserQuery
roleUserQuery
=
new
RoleUserQuery
();
roleUserQuery
.
setUserId
(
entity
.
getId
());
roleUserQuery
.
setRoleIdList
(
Arrays
.
asList
(
Long
.
parseLong
(
entity
.
getRoleId
())));
roleUserService
.
assignRoleToUser
(
roleUserQuery
);
}
}
@Override
protected
void
updateAfter
(
UserEntity
entity
,
Context
context
)
throws
AppException
{
super
.
updateAfter
(
entity
,
context
);
}
}
\ No newline at end of file
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