Ver código fonte

修改方法

snihwxf 2 meses atrás
pai
commit
df771a07e7

+ 8 - 5
src/main/java/com/xjrsoft/module/courseTable/service/impl/CourseTableServiceImpl.java

@@ -377,11 +377,14 @@ public class CourseTableServiceImpl extends ServiceImpl<CourseTableMapper, Cours
             dto.setTimeNumbers(idList);
             List<CourseListVo> excludeList = courseTableMapper.getAdjustList2(dto);
 
-            list = list.stream()
-                    .filter(vo -> excludeList.stream()
-                            .noneMatch(ex -> ex.getTimeNumber().equals(vo.getTimeNumber()))
-                    )
-                    .collect(Collectors.toList());
+//            list = list.stream()
+//                    .filter(vo -> excludeList.stream()
+//                            .noneMatch(ex -> ex.getTimeNumber().equals(vo.getTimeNumber()))
+//                    )
+//                    .collect(Collectors.toList());
+            list.removeIf(vo -> excludeList.stream()
+                    .anyMatch(ex -> ex.getTimeNumber().equals(vo.getTimeNumber()))
+            );
         }
 
         for (CourseListVo courseListVo : list) {