From 5d65b4d50d1e80a7d8106070b2cc338c12e26933 Mon Sep 17 00:00:00 2001 From: DU Date: Fri, 8 Jan 2021 18:09:47 +0800 Subject: [PATCH] =?UTF-8?q?=E9=BB=98=E8=AE=A4=E8=AF=BE=E7=A8=8B=E8=80=83?= =?UTF-8?q?=E8=AF=95=E4=B8=8D=E5=88=86=E6=98=AF=E5=90=A6=E6=89=80=E5=B1=9E?= =?UTF-8?q?=E5=8D=95=E4=BD=8D=E5=A7=8B=E7=BB=88=E5=B1=95=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../rtss/services/MapSystemService.java | 23 +++++++++---------- 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/src/main/java/club/joylink/rtss/services/MapSystemService.java b/src/main/java/club/joylink/rtss/services/MapSystemService.java index 7d823f9b3..842ef5bb9 100644 --- a/src/main/java/club/joylink/rtss/services/MapSystemService.java +++ b/src/main/java/club/joylink/rtss/services/MapSystemService.java @@ -225,21 +225,20 @@ public class MapSystemService implements IMapSystemService { if(!CollectionUtils.isEmpty(departLessonRefs)){ lessonVOList = iLessonService.getValidLesson(departLessonRefs.stream().map(DepartmentLesson::getLessonId).collect(Collectors.toList()), mapSystem.getPrdType()); } - //默认课程展示 - MapVO mapVO = iMapService.findMapBaseInfoById(mapSystem.getMapId()); - BusinessConsts.Lesson.PrdInfo prdInfo = BusinessConsts.Lesson.PrdInfo.getBy(mapSystem.getPrdType()); - if (Objects.nonNull(prdInfo)) { - String defaultLessonName = String.join("-", mapVO.getName(), prdInfo.getName()); - LessonVO existedDefaultLesson = iLessonService.findByMapAndNameAndPrdType(mapSystem.getMapId(), defaultLessonName, mapSystem.getPrdType()); - if (Objects.nonNull(existedDefaultLesson)) { - if (lessonVOList.stream().noneMatch(lessonVO -> lessonVO.getId().equals(existedDefaultLesson.getId()))) { - lessonVOList.add(existedDefaultLesson); - } + } + //默认课程展示 + MapVO mapVO = iMapService.findMapBaseInfoById(mapSystem.getMapId()); + BusinessConsts.Lesson.PrdInfo prdInfo = BusinessConsts.Lesson.PrdInfo.getBy(mapSystem.getPrdType()); + if (Objects.nonNull(prdInfo)) { + String defaultLessonName = String.join("-", mapVO.getName(), prdInfo.getName()); + LessonVO existedDefaultLesson = iLessonService.findByMapAndNameAndPrdType(mapSystem.getMapId(), defaultLessonName, mapSystem.getPrdType()); + if (Objects.nonNull(existedDefaultLesson)) { + if (lessonVOList.stream().noneMatch(lessonVO -> lessonVO.getId().equals(existedDefaultLesson.getId()))) { + lessonVOList.add(existedDefaultLesson); } } } - } - else{ + } else{ lessonVOList = iLessonService.getByMapIdAndPrdType(mapSystem.getMapId(), mapSystem.getPrdType()); }