Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
sample-form-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
赵啸非
sample-form-platform
Commits
adbd8440
Commit
adbd8440
authored
Apr 23, 2025
by
赵啸非
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加角色菜单权限新实现
parent
8de56134
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
6 deletions
+3
-6
sample-form-manager/src/main/java/com/mortals/xhx/base/system/user/service/impl/UserServiceImpl.java
...ls/xhx/base/system/user/service/impl/UserServiceImpl.java
+0
-5
sample-form-manager/src/main/resources/sqlmap/base/system/RoleUserMapper.xml
.../src/main/resources/sqlmap/base/system/RoleUserMapper.xml
+3
-1
No files found.
sample-form-manager/src/main/java/com/mortals/xhx/base/system/user/service/impl/UserServiceImpl.java
View file @
adbd8440
...
@@ -64,11 +64,9 @@ public class UserServiceImpl extends AbstractCRUDCacheServiceImpl<UserDao, UserE
...
@@ -64,11 +64,9 @@ public class UserServiceImpl extends AbstractCRUDCacheServiceImpl<UserDao, UserE
private
ResourceService
resourceService
;
private
ResourceService
resourceService
;
@Autowired
@Autowired
private
RoleUserService
roleUserService
;
private
RoleUserService
roleUserService
;
@Lazy
@Lazy
@Autowired
@Autowired
private
IUserFeign
userFeign
;
private
IUserFeign
userFeign
;
@Override
@Override
protected
String
getExtKey
(
UserEntity
data
)
{
protected
String
getExtKey
(
UserEntity
data
)
{
return
data
.
getLoginName
();
return
data
.
getLoginName
();
...
@@ -326,9 +324,7 @@ public class UserServiceImpl extends AbstractCRUDCacheServiceImpl<UserDao, UserE
...
@@ -326,9 +324,7 @@ public class UserServiceImpl extends AbstractCRUDCacheServiceImpl<UserDao, UserE
List
<
UserPdu
>
userPduList
=
resp
.
getData
().
getData
();
List
<
UserPdu
>
userPduList
=
resp
.
getData
().
getData
();
log
.
info
(
"用户总数量:{}"
,
userPduList
.
size
());
log
.
info
(
"用户总数量:{}"
,
userPduList
.
size
());
if
(!
ObjectUtils
.
isEmpty
(
userPduList
))
{
if
(!
ObjectUtils
.
isEmpty
(
userPduList
))
{
Map
<
String
,
UserPdu
>
userPduMap
=
userPduList
.
stream
().
collect
(
Collectors
.
toMap
(
x
->
x
.
getLoginName
(),
y
->
y
,
(
x
,
y
)
->
x
));
Map
<
String
,
UserPdu
>
userPduMap
=
userPduList
.
stream
().
collect
(
Collectors
.
toMap
(
x
->
x
.
getLoginName
(),
y
->
y
,
(
x
,
y
)
->
x
));
List
<
UserEntity
>
newUserList
=
userPduList
.
stream
().
map
(
newUser
->
{
List
<
UserEntity
>
newUserList
=
userPduList
.
stream
().
map
(
newUser
->
{
UserEntity
userEntity
=
new
UserEntity
();
UserEntity
userEntity
=
new
UserEntity
();
userEntity
.
initAttrValue
();
userEntity
.
initAttrValue
();
...
@@ -357,7 +353,6 @@ public class UserServiceImpl extends AbstractCRUDCacheServiceImpl<UserDao, UserE
...
@@ -357,7 +353,6 @@ public class UserServiceImpl extends AbstractCRUDCacheServiceImpl<UserDao, UserE
//需要新增的用户
//需要新增的用户
log
.
info
(
"需要新增用户数量:{}"
,
saveUpdateCollect
.
get
(
true
).
size
());
log
.
info
(
"需要新增用户数量:{}"
,
saveUpdateCollect
.
get
(
true
).
size
());
saveUpdateCollect
.
get
(
true
).
stream
().
forEach
(
item
->
{
saveUpdateCollect
.
get
(
true
).
stream
().
forEach
(
item
->
{
UserPdu
pdu
=
userPduMap
.
get
(
item
.
getLoginName
());
UserPdu
pdu
=
userPduMap
.
get
(
item
.
getLoginName
());
if
(!
ObjectUtils
.
isEmpty
(
pdu
)){
if
(!
ObjectUtils
.
isEmpty
(
pdu
)){
item
.
setId
(
pdu
.
getId
());
item
.
setId
(
pdu
.
getId
());
...
...
sample-form-manager/src/main/resources/sqlmap/base/system/RoleUserMapper.xml
View file @
adbd8440
...
@@ -236,13 +236,15 @@
...
@@ -236,13 +236,15 @@
</delete>
</delete>
<!-- 根据paramDto删除一批 -->
<!-- 根据paramDto删除一批 -->
<delete
id=
"deleteByMap"
parameterType=
"paramDto"
>
<delete
id=
"deleteByMap"
parameterType=
"paramDto"
>
delete
from mortals_xhx_role_user as a
delete
from mortals_xhx_role_user
<trim
suffixOverrides=
"where"
suffix=
""
>
<trim
suffixOverrides=
"where"
suffix=
""
>
where
where
<trim
prefixOverrides=
"and"
prefix=
""
>
<trim
prefixOverrides=
"and"
prefix=
""
>
<trim
prefixOverrides=
"a."
prefix=
""
>
<include
refid=
"_condition_"
/>
<include
refid=
"_condition_"
/>
</trim>
</trim>
</trim>
</trim>
</trim>
</delete>
</delete>
<!-- 获取列表 -->
<!-- 获取列表 -->
<select
id=
"getList"
parameterType=
"paramDto"
resultMap=
"RoleUserEntity-Map"
>
<select
id=
"getList"
parameterType=
"paramDto"
resultMap=
"RoleUserEntity-Map"
>
...
...
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