zouxuan 2 years ago
parent
commit
16ee366552

+ 2 - 4
mec-biz/src/main/java/com/ym/mec/biz/service/impl/CourseScheduleServiceImpl.java

@@ -4414,14 +4414,12 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
             dataList = courseScheduleDao.findGroupCourseSchedules(vipGroup.getId().toString(),GroupType.VIP.getCode());
         }
 		if(!CollectionUtils.isEmpty(dataList)){
-			Stream<CourseSchedule> stream = dataList.stream();
 			if(StringUtils.isNotEmpty(queryInfo.getSearch())){
-				stream = stream.filter(e -> (e.getId() != null && e.getId().toString().equals(queryInfo.getSearch())) || e.getName().contains(queryInfo.getSearch()));
+				dataList = dataList.stream().filter(e -> (e.getId() != null && e.getId().toString().equals(queryInfo.getSearch())) || e.getName().contains(queryInfo.getSearch())).collect(Collectors.toList());
 			}
 			if(StringUtils.isNotEmpty(queryInfo.getClassDate())){
-				stream.filter(e->DateUtil.dateToString(e.getClassDate(),DateUtil.ISO_EXPANDED_DATE_FORMAT).equals(queryInfo.getClassDate()));
+				dataList = dataList.stream().filter(e->DateUtil.dateToString(e.getClassDate(),DateUtil.ISO_EXPANDED_DATE_FORMAT).equals(queryInfo.getClassDate())).collect(Collectors.toList());
 			}
-			dataList = stream.collect(Collectors.toList());
 		}
 
         int count = dataList.size();