|
|
@@ -99,7 +99,8 @@ public class CourseServiceImpl implements CourseService {
|
|
|
wrapper.eq("course_id", courseQueryDTO.getCourseId());
|
|
|
}
|
|
|
if (courseQueryDTO.getTeacherId() != null) { // 模糊匹配teacherIds中是否包含这个字段
|
|
|
- wrapper.like("teacher_ids", "%" + courseQueryDTO.getTeacherId() + "%"); // 模糊匹配
|
|
|
+ wrapper.apply("FIND_IN_SET({0}, teacher_ids) > 0", courseQueryDTO.getTeacherId());
|
|
|
+ // wrapper.like("teacher_ids", "%" + courseQueryDTO.getTeacherId() + "%"); // 模糊匹配
|
|
|
}
|
|
|
if (courseQueryDTO.getCourseName() != null) { // 模糊匹配课程名字
|
|
|
wrapper.like("course_name", courseQueryDTO.getCourseName());
|
|
|
@@ -138,7 +139,6 @@ public class CourseServiceImpl implements CourseService {
|
|
|
wrapper.ge("start_time", startDate.format(formatter))
|
|
|
.le("end_time", endDate.format(formatter));
|
|
|
}
|
|
|
-
|
|
|
return wrapper;
|
|
|
}
|
|
|
|