left join teacher_open_course_merge_teacher ta on ta.teacher_open_course_id = t.teacher_open_course_id
left join teacher tb on tb.teacher_id = ta.teacher_id and tb.teacher_status = 1
left join (select max(course_label_id) as course_label_id, teacher_open_course_id from teacher_open_course_merge_course_info where course_label_id is not null group by teacher_open_course_id) tc
on tc.teacher_open_course_id = t.teacher_open_course_id
where 1=1
@//数据权限,该sql语句功能点,如果不考虑数据权限,可以删除此行
and #function("teacherOpenCourse.query")#
@ -63,7 +65,10 @@ queryByCondition
@if(!isEmpty(teacherOpenCourseMergeAuthCode)){
and ta.teacher_open_course_merge_teacher_auth_code =#teacherOpenCourseMergeAuthCode#
@}
order by ta.teacher_open_course_merge_teacher_order_index desc
@if(!isEmpty(courseLabelIdPlural)){
and find_in_set(tc.course_label_id, #courseLabelIdPlural#)
@}
order by ta.teacher_open_course_merge_teacher_order_index asc
queryByConditionQuery
@ -77,6 +82,8 @@ queryByConditionQuery
from teacher_open_course t
left join teacher_open_course_merge_teacher ta on ta.teacher_open_course_id = t.teacher_open_course_id
left join teacher tb on tb.teacher_id = ta.teacher_id and tb.teacher_status = 1
left join (select max(course_label_id) as course_label_id, teacher_open_course_id from teacher_open_course_merge_course_info where course_label_id is not null group by teacher_open_course_id) tc
on tc.teacher_open_course_id = t.teacher_open_course_id
where 1=1
@if(!isEmpty(teacherOpenCourseId)){
and t.teacher_open_course_id =#teacherOpenCourseId#
@ -129,7 +136,10 @@ queryByConditionQuery
@if(!isEmpty(teacherOpenCourseMergeAuthCode)){
and ta.teacher_open_course_merge_teacher_auth_code =#teacherOpenCourseMergeAuthCode#
@}
order by ta.teacher_open_course_merge_teacher_order_index desc
@if(!isEmpty(courseLabelIdPlural)){
and find_in_set(tc.course_label_id, #courseLabelIdPlural#)
@}
order by ta.teacher_open_course_merge_teacher_order_index asc