mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/per-boe/java-servers.git
synced 2025-12-11 03:46:50 +08:00
仅内网可见
This commit is contained in:
@@ -45,10 +45,7 @@ import javax.annotation.Resource;
|
|||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import java.io.UnsupportedEncodingException;
|
import java.io.UnsupportedEncodingException;
|
||||||
import java.net.URLEncoder;
|
import java.net.URLEncoder;
|
||||||
import java.util.ArrayList;
|
import java.util.*;
|
||||||
import java.util.Collection;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Optional;
|
|
||||||
import java.util.concurrent.ForkJoinPool;
|
import java.util.concurrent.ForkJoinPool;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
import java.util.stream.IntStream;
|
import java.util.stream.IntStream;
|
||||||
@@ -407,4 +404,23 @@ public class ThirdApi {
|
|||||||
.body()).orElseThrow(() -> new RuntimeException("token校验失败"));
|
.body()).orElseThrow(() -> new RuntimeException("token校验失败"));
|
||||||
log.info("-------delOnLineById = " + resp);
|
log.info("-------delOnLineById = " + resp);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//获取字典信息
|
||||||
|
public List<String> getDictItems() {
|
||||||
|
try {
|
||||||
|
CommonSearchVo searcher = new CommonSearchVo();
|
||||||
|
searcher.setPid(380L);
|
||||||
|
searcher.setType(1);
|
||||||
|
List<Dict> dictList = dictRemoteClient.getList(searcher);
|
||||||
|
if(!Objects.isNull(dictList) && dictList.size() > 0){
|
||||||
|
List<String> dicts = dictList.stream().map(Dict::getValue).collect(Collectors.toList());
|
||||||
|
return dicts;
|
||||||
|
}else {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.error("-------获取字典信息 = " + e.getMessage());
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -169,13 +169,19 @@ public class CourseManageApi extends ApiBaseController{
|
|||||||
List<CourseSection> sectionlist=sectionService.getByCourseId(id);
|
List<CourseSection> sectionlist=sectionService.getByCourseId(id);
|
||||||
List<CourseTeacher> teachers=courseService.findTeachersByCourseId(id);
|
List<CourseTeacher> teachers=courseService.findTeachersByCourseId(id);
|
||||||
List<CourseCrowd> crowds=courseService.findCrowdByCourseId(id);
|
List<CourseCrowd> crowds=courseService.findCrowdByCourseId(id);
|
||||||
|
List<String> dicts = thirdApi.getDictItems();
|
||||||
|
|
||||||
//
|
boolean isPermission = false;
|
||||||
|
if(dicts != null && dicts.size() > 0){
|
||||||
|
isPermission = dicts.contains(course.getResOwner1());
|
||||||
|
}
|
||||||
|
log.error("-------是否仅内网查看 = " + isPermission);
|
||||||
rs.put("course",course);
|
rs.put("course",course);
|
||||||
rs.put("contents",cclist);
|
rs.put("contents",cclist);
|
||||||
rs.put("sections",sectionlist);
|
rs.put("sections",sectionlist);
|
||||||
rs.put("teachers",teachers);
|
rs.put("teachers",teachers);
|
||||||
rs.put("crowds",crowds);
|
rs.put("crowds",crowds);
|
||||||
|
rs.put("isPermission",isPermission);
|
||||||
|
|
||||||
|
|
||||||
return success(rs);
|
return success(rs);
|
||||||
|
|||||||
Reference in New Issue
Block a user