mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/per-boe/java-servers.git
synced 2025-12-09 10:56:50 +08:00
课程受众权限调整
This commit is contained in:
@@ -267,12 +267,15 @@ public class CoursePortalApi extends ApiBaseController{
|
||||
// 此课程是否包含此aid用户
|
||||
// 例外情况判断
|
||||
boolean pass = false;
|
||||
if (!courseCrowdList.isEmpty()) {
|
||||
if (!Objects.isNull(studyCourse)){
|
||||
pass = true;
|
||||
}
|
||||
if (Objects.isNull(studyCourse) && !courseCrowdList.isEmpty()) {
|
||||
List<String> audienceList = Arrays.asList(audiences.split(",")); // 此用户所在受众组
|
||||
log.error("---------------参数------------ audienceList = " + audienceList);
|
||||
for (CourseCrowd c : courseCrowdList) {
|
||||
for (String audience :audienceList){
|
||||
if (Objects.isNull(studyCourse) || c.getGroupId().equals(audience)) {
|
||||
if (c.getGroupId().equals(audience)) {
|
||||
pass = true;
|
||||
break;
|
||||
}
|
||||
@@ -285,6 +288,7 @@ public class CoursePortalApi extends ApiBaseController{
|
||||
pass = true;
|
||||
}
|
||||
|
||||
|
||||
log.error("=--------- 是否有权限查看此课程: " +pass);
|
||||
List<CourseContent> cclist=contentService.getByCourseId(id);
|
||||
List<CourseSection> sectionlist=sectionService.getByCourseId(id);
|
||||
|
||||
@@ -173,12 +173,15 @@ public class StudyCourseApi extends ApiBaseController{
|
||||
// 此课程是否包含此aid用户
|
||||
// 例外情况判断
|
||||
boolean pass = false;
|
||||
if (!courseCrowdList.isEmpty()) {
|
||||
if (!Objects.isNull(studyCourse)){
|
||||
pass = true;
|
||||
}
|
||||
if (Objects.isNull(studyCourse) && !courseCrowdList.isEmpty()) {
|
||||
List<String> audienceList = Arrays.asList(audiences.split(",")); // 此用户所在受众组
|
||||
log.error("---------------参数------------ audienceList = " + audienceList);
|
||||
for (CourseCrowd c : courseCrowdList) {
|
||||
for (String audience :audienceList){
|
||||
if (Objects.isNull(studyCourse) || c.getGroupId().equals(audience)) {
|
||||
if (c.getGroupId().equals(audience)) {
|
||||
pass = true;
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user