mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/per-boe/java-servers.git
synced 2025-12-12 20:36:50 +08:00
fix: 【FCJDFDXTXS-86】去掉一个where条件
This commit is contained in:
@@ -320,10 +320,11 @@ public class CourseDao extends BaseDao<Course> {
|
||||
builder.append("AND c.published = :publish");
|
||||
}
|
||||
// 时间筛选逻辑:只有当两个时间参数都提供时才启用学习记录存在性校验
|
||||
if (filterLearningTime) {
|
||||
// 注释掉原有的WHERE条件中的时间筛选逻辑,因为时间筛选应只影响聚合字段的计算,不应过滤课程记录
|
||||
/*if (filterLearningTime) {
|
||||
builder.append(System.lineSeparator());
|
||||
builder.append("AND (:learningTimeStart IS NULL OR :learningTimeEnd IS NULL OR EXISTS (SELECT 1 FROM boe_study_course sc WHERE sc.course_id = c.id AND sc.finish_time IS NOT NULL AND sc.add_time >= :learningTimeStart AND sc.finish_time <= :learningTimeEnd))");
|
||||
}
|
||||
}*/
|
||||
// 授课教师筛选 - 使用EXISTS子查询替代JOIN以避免数据重复
|
||||
// 注意:由于上方已通过GROUP_CONCAT聚合教师姓名,此处仅用于教师筛选条件
|
||||
if (StringUtils.isNotBlank(queryDTO.getTeacherId())) {
|
||||
|
||||
Reference in New Issue
Block a user