Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
eshiled-new
/
ne-shield-usercenter
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit bd6f35ad
authored
Mar 18, 2022
by
levphon
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
bug修复
1 parent
639cb9b0
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
3 deletions
src/main/java/cn/com/glsx/shield/modules/mapper/UserMapper.java
src/main/java/cn/com/glsx/shield/modules/service/DepartmentService.java
src/main/resources/mapper/UserMapper.xml
src/main/java/cn/com/glsx/shield/modules/mapper/UserMapper.java
View file @
bd6f35a
...
@@ -24,6 +24,8 @@ public interface UserMapper extends CommonBaseMapper<User> {
...
@@ -24,6 +24,8 @@ public interface UserMapper extends CommonBaseMapper<User> {
List
<
User
>
selectByTenantId
(
@Param
(
"tenantId"
)
Long
tenantId
);
List
<
User
>
selectByTenantId
(
@Param
(
"tenantId"
)
Long
tenantId
);
List
<
User
>
selectByTenantIds
(
@Param
(
"tenantIds"
)
Collection
<
Long
>
tenantIds
);
List
<
User
>
selectByDepartmentId
(
@Param
(
"departmentId"
)
Long
departmentId
);
List
<
User
>
selectByDepartmentId
(
@Param
(
"departmentId"
)
Long
departmentId
);
List
<
OrgModel
>
selectUserOrgModelById
(
@Param
(
"id"
)
Long
id
);
List
<
OrgModel
>
selectUserOrgModelById
(
@Param
(
"id"
)
Long
id
);
...
...
src/main/java/cn/com/glsx/shield/modules/service/DepartmentService.java
View file @
bd6f35a
...
@@ -207,6 +207,12 @@ public class DepartmentService {
...
@@ -207,6 +207,12 @@ public class DepartmentService {
List
<
Long
>
subUserIdList
=
userPathList
.
stream
().
map
(
UserPath:
:
getSubId
).
collect
(
Collectors
.
toList
());
List
<
Long
>
subUserIdList
=
userPathList
.
stream
().
map
(
UserPath:
:
getSubId
).
collect
(
Collectors
.
toList
());
return
userMapper
.
selectByIds
(
subUserIdList
);
return
userMapper
.
selectByIds
(
subUserIdList
);
}
else
if
(
assignTenants
.
getCode
().
equals
(
role
.
getRolePermissionType
()))
{
List
<
Tenant
>
tenantList
=
this
.
getRolePermissionTenants
();
List
<
Long
>
tenantIdList
=
tenantList
.
stream
().
map
(
Tenant:
:
getId
).
collect
(
Collectors
.
toList
());
return
userMapper
.
selectByTenantIds
(
tenantIdList
);
}
}
return
userList
;
return
userList
;
}
}
...
...
src/main/resources/mapper/UserMapper.xml
View file @
bd6f35a
...
@@ -58,10 +58,22 @@
...
@@ -58,10 +58,22 @@
</select>
</select>
<select
id=
"selectByTenantId"
resultMap=
"BaseResultMap"
>
<select
id=
"selectByTenantId"
resultMap=
"BaseResultMap"
>
select *
select
<include
refid=
"Base_Column_List"
/>
from t_user
from t_user
where tenant_id = #{tenantId}
where del_flag = 0
and del_flag = 0
and tenant_id = #{tenantId}
</select>
<select
id=
"selectByTenantIds"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from t_user
where del_flag = 0
and tenant_id in
<foreach
collection=
"tenantIds"
item=
"item"
open=
"("
close=
")"
separator=
","
>
#{item}
</foreach>
</select>
</select>
<select
id=
"selectByDepartmentId"
resultMap=
"BaseResultMap"
>
<select
id=
"selectByDepartmentId"
resultMap=
"BaseResultMap"
>
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment