|
@@ -11,13 +11,16 @@
|
|
tc.create_id AS createId,
|
|
tc.create_id AS createId,
|
|
tc.create_time AS createTime,
|
|
tc.create_time AS createTime,
|
|
tc.user_id AS userId,
|
|
tc.user_id AS userId,
|
|
|
|
+ cr.real_name AS creatorName,
|
|
su.real_name AS userName
|
|
su.real_name AS userName
|
|
FROM
|
|
FROM
|
|
teach_course tc
|
|
teach_course tc
|
|
INNER JOIN
|
|
INNER JOIN
|
|
basic_course bc ON tc.school_id = bc.school_id AND tc.course_code = bc.code AND bc.enable = TRUE
|
|
basic_course bc ON tc.school_id = bc.school_id AND tc.course_code = bc.code AND bc.enable = TRUE
|
|
LEFT JOIN
|
|
LEFT JOIN
|
|
- sys_user su on tc.user_id = su.id
|
|
|
|
|
|
+ sys_user su ON tc.user_id = su.id
|
|
|
|
+ LEFT JOIN
|
|
|
|
+ sys_user cr ON tc.create_id = cr.id
|
|
<where>
|
|
<where>
|
|
<if test="schoolId != null">
|
|
<if test="schoolId != null">
|
|
AND tc.school_id = #{schoolId}
|
|
AND tc.school_id = #{schoolId}
|
|
@@ -59,6 +62,9 @@
|
|
sys_org so ON su.org_id = so.id
|
|
sys_org so ON su.org_id = so.id
|
|
<where>
|
|
<where>
|
|
AND su.enable = true
|
|
AND su.enable = true
|
|
|
|
+ <if test="courseCode != null and courseCode != ''">
|
|
|
|
+ AND tc.course_code = #{courseCode}
|
|
|
|
+ </if>
|
|
<if test="leaderId != null">
|
|
<if test="leaderId != null">
|
|
AND tc.create_id = #{leaderId}
|
|
AND tc.create_id = #{leaderId}
|
|
</if>
|
|
</if>
|