mirror of
https://github.com/PlayEdu/PlayEdu
synced 2025-12-25 20:35:35 +08:00
修复/user/courses 接口category_id参数过滤报错
This commit is contained in:
@@ -237,11 +237,10 @@ public class CourseServiceImpl extends ServiceImpl<CourseMapper, Course> impleme
|
||||
if (tmpCourseIds == null || tmpCourseIds.size() == 0) {
|
||||
return new ArrayList<>();
|
||||
}
|
||||
// 取交集
|
||||
courseIds.retainAll(tmpCourseIds);
|
||||
}
|
||||
if (courseIds.size() == 0) {
|
||||
return new ArrayList<>();
|
||||
courseIds = courseIds.stream().filter(tmpCourseIds::contains).toList();
|
||||
if (courseIds.size() == 0) {
|
||||
return new ArrayList<>();
|
||||
}
|
||||
}
|
||||
return list(query().getWrapper().in("id", courseIds).eq("is_show", 1));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user