|
@@ -1253,12 +1253,15 @@
|
|
|
ccs.sort,
|
|
|
cs.section_id AS id,
|
|
|
#{courseId} AS course_id,
|
|
|
- ( SELECT u.realname FROM `user` u WHERE 1 = 1 <if test="userId != null and userId !='' ">
|
|
|
- and u.user_id = #{userId}
|
|
|
- </if> ) AS realname,
|
|
|
- ( SELECT u.user_id FROM `user` u WHERE 1 = 1 <if test="userId != null and userId !='' ">
|
|
|
- and u.user_id = #{userId}
|
|
|
- </if> ) AS user_id,
|
|
|
+ <if test="userId != null and userId !='' ">
|
|
|
+ (SELECT u.realname FROM `user` u where 1=1
|
|
|
+ and u.user_id = #{userId}
|
|
|
+ ) as realname,
|
|
|
+ </if>
|
|
|
+
|
|
|
+ <if test="userId != null and userId !='' ">
|
|
|
+ #{userId} as user_id,
|
|
|
+ </if>
|
|
|
cs.NAME AS type_name,
|
|
|
cs.duration_time,
|
|
|
cs.section_type,
|