LEFT JOIN teacher_open_course_merge_teacher tocmt on a.teacher_open_course_id = tocmt.teacher_open_course_id
LEFT JOIN teacher t on t.teacher_id = tocmt.teacher_id
WHERE 1 = 1
AND a.teacher_open_course_status = 1
AND tocmt.teacher_open_course_merge_teacher_status=1
AND t.teacher_status=1
@if(!isEmpty(orgId)){
AND a.org_id =#orgId#
@}
@if(!isEmpty(courseLabelId)){
AND a.teacher_open_course_id in (
select teacher_open_course_id from teacher_open_course_merge_course_info c where c.course_label_id = #courseLabelId# and c.course_info_type = 1 and c.course_info_status = 1
)
@}
)
UNION ALL
(
select
2 `type`,
ci.course_info_id `teacher_open_course_id`,
ci.course_info_name `course_name`,
ci.course_info_thumbnail `course_cover`,
'系统管理员' `name`
from universities_colleges uc
LEFT JOIN universities_colleges_jurisdiction_curriculum_resources ucjcr ON ucjcr.universities_colleges_id = uc.universities_colleges_id
LEFT JOIN course_info ci ON ci.course_info_id = ucjcr.course_info_id AND ci.course_info_type =1
where 1 = 1
and uc.universities_colleges_status = 1
and ci.course_info_status = 1
and ucjcr.use_type in (1,2)
and now() between ucjcr.use_start_time and ucjcr.use_end_time