Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
C
chnmuseum-party
Project
Project
Details
Activity
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
liqin
chnmuseum-party
Commits
826b2276
Commit
826b2276
authored
May 15, 2021
by
jiawei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
BUG修改====》》单位管理员可以看到平台用户、本单位人员及下属单位创建的学习内容,加上全平台
parent
ad1620c4
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
3 deletions
+7
-3
LearningContentController.java
...useum/party/web/controller/LearningContentController.java
+7
-3
No files found.
src/main/java/cn/chnmuseum/party/web/controller/LearningContentController.java
View file @
826b2276
...
@@ -32,6 +32,7 @@ import org.springframework.web.bind.annotation.*;
...
@@ -32,6 +32,7 @@ import org.springframework.web.bind.annotation.*;
import
javax.annotation.Resource
;
import
javax.annotation.Resource
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.Arrays
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
...
@@ -256,7 +257,9 @@ public class LearningContentController extends BaseController {
...
@@ -256,7 +257,9 @@ public class LearningContentController extends BaseController {
LambdaQueryWrapper
<
LearningContent
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
LambdaQueryWrapper
<
LearningContent
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
List
<
String
>
curUserSubOrgIds
=
getCurUserSubOrgIds
();
List
<
String
>
curUserSubOrgIds
=
getCurUserSubOrgIds
();
if
(!
CollectionUtils
.
isEmpty
(
curUserSubOrgIds
)){
if
(!
CollectionUtils
.
isEmpty
(
curUserSubOrgIds
)){
queryWrapper
.
in
(
LearningContent:
:
getOrganCode
,
curUserSubOrgIds
);
List
<
String
>
list
=
Arrays
.
asList
(
"ALL_PLAT"
);
queryWrapper
.
and
(
s
->
s
.
in
(
LearningContent:
:
getOrganCode
,
curUserSubOrgIds
).
or
()
.
in
(
LearningContent:
:
getApplicableScope
,
list
));
}
}
// 根据创建时间区间检索
// 根据创建时间区间检索
if
(
genericPageParam
.
getIsPublished
()
!=
null
)
{
if
(
genericPageParam
.
getIsPublished
()
!=
null
)
{
...
@@ -325,14 +328,15 @@ public class LearningContentController extends BaseController {
...
@@ -325,14 +328,15 @@ public class LearningContentController extends BaseController {
if
(
tUser
==
null
||
StringUtils
.
isBlank
(
tUser
.
getOrgId
()))
{
if
(
tUser
==
null
||
StringUtils
.
isBlank
(
tUser
.
getOrgId
()))
{
return
null
;
return
null
;
}
}
//平台管理员、单位管理员、学习内容管理员
//平台管理员、单位管理员、学习内容管理员
单位管理员不能看到其它非同一机构的单位管理员
List
<
String
>
roleList
=
tUser
.
getRoleList
();
List
<
String
>
roleList
=
tUser
.
getRoleList
();
boolean
condition
=
!
CollectionUtils
.
isEmpty
(
roleList
)
//不为空
boolean
condition
=
!
CollectionUtils
.
isEmpty
(
roleList
)
//不为空
&&
roleList
.
contains
(
"2"
)
//2是单位管理员
&&
roleList
.
contains
(
"2"
)
//2是单位管理员
&&
!
roleList
.
contains
(
"1"
)
//不包含 1是平台管理员
&&
!
roleList
.
contains
(
"1"
)
//不包含 1是平台管理员
&&
!
roleList
.
contains
(
"8"
);
//不包含 8是学习内容管理员
&&
!
roleList
.
contains
(
"8"
);
//不包含 8是学习内容管理员
//不是这种情况查询全部
//不是只为单位管理员这种情况查询全部
// userRoleService
if
(!
condition
)
{
if
(!
condition
)
{
return
null
;
return
null
;
}
}
...
...
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