|
@@ -213,8 +213,11 @@ public class MapServiceImpl extends SuperServiceImpl<MapMapper, Map> implements
|
|
|
mapVo.setRoutes(mapRouteVoList);
|
|
|
mapRouteVoList.forEach(mapRouteVo -> {
|
|
|
List<MapContent> mapContentList = mapContentMapper.findAllMapContent(mapRouteVo.getPkId());
|
|
|
- if (!CollectionUtils.isEmpty(mapContentList)) {
|
|
|
- List<MapContentVo> mapContentVoList = mapContentList.stream().map(mapContent -> {
|
|
|
+ //过滤掉知识ID不为空且知识被删除的数据
|
|
|
+ List<MapContent> collect = mapContentList.stream().
|
|
|
+ filter(e -> !(e.getKnowledgeId() != null && e.getKnowledgeIsDel() == null)).collect(Collectors.toList());
|
|
|
+ if (!CollectionUtils.isEmpty(collect)) {
|
|
|
+ List<MapContentVo> mapContentVoList = collect.stream().map(mapContent -> {
|
|
|
MapContentVo mapContentVo = new MapContentVo();
|
|
|
BeanUtils.copyProperties(mapContent, mapContentVo);
|
|
|
if (mapContent.getKnowledgeId() != null) {
|
|
@@ -373,8 +376,11 @@ public class MapServiceImpl extends SuperServiceImpl<MapMapper, Map> implements
|
|
|
//设置学习路径状态
|
|
|
route.setState(0);
|
|
|
List<MapContent> contentList = mapContentMapper.findAllMapContent(route.getPkId());
|
|
|
- if (!CollectionUtils.isEmpty(contentList)){
|
|
|
- List<MapContentVo> contents = contentList.parallelStream().map(mapContent -> {
|
|
|
+ //过滤掉知识ID不为空且知识被删除的数据
|
|
|
+ List<MapContent> collect = contentList.stream().
|
|
|
+ filter(e -> !(e.getKnowledgeId() != null && e.getKnowledgeIsDel() == null)).collect(Collectors.toList());
|
|
|
+ if (!CollectionUtils.isEmpty(collect)){
|
|
|
+ List<MapContentVo> contents = collect.parallelStream().map(mapContent -> {
|
|
|
MapContentVo content = new MapContentVo();
|
|
|
BeanUtils.copyProperties(mapContent, content);
|
|
|
//查看知识
|