浏览代码

测评查询问题

zouxuan 1 年之前
父节点
当前提交
36009a0404
共有 1 个文件被更改,包括 6 次插入1 次删除
  1. 6 1
      mec-biz/src/main/resources/config/mybatis/LessonExaminationMapper.xml

+ 6 - 1
mec-biz/src/main/resources/config/mybatis/LessonExaminationMapper.xml

@@ -40,10 +40,11 @@
         where le.id_ = #{lessonExaminationId} AND num > 0
     </update>
     <select id="queryPage" resultType="com.ym.mec.biz.dal.dto.LessonExaminationResultDto">
-        select le.*,cg.name_ classGroupName
+        select le.*,cg.name_ classGroupName,su.real_name_ teacherName
         from lesson_examination le
         left join student_lesson_examination sle ON sle.lesson_examination_id_ = le.id_
         left join class_group cg ON cg.id_ = le.class_group_id_
+        left join sys_user su ON su.id_ = le.teacher_id_
         <include refid="queryPageSql"/>
         GROUP BY le.id_ ORDER BY le.id_ DESC
         <include refid="global.limit"/>
@@ -53,6 +54,7 @@
         from lesson_examination le
         left join student_lesson_examination sle ON sle.lesson_examination_id_ = le.id_
         left join class_group cg ON cg.id_ = le.class_group_id_
+        left join sys_user su ON su.id_ = le.teacher_id_
         <include refid="queryPageSql"/>
     </select>
     <sql id="queryPageSql">
@@ -60,6 +62,9 @@
             <if test="lessonExaminationId != null">
                 AND le.id_ = #{lessonExaminationId}
             </if>
+            <if test="search != null and search != ''">
+                AND su.real_name_ LIKE CONCAT('%',#{search},'%')
+            </if>
             <if test="musicGroupId != null and musicGroupId != ''">
                 AND le.music_group_id_ = #{musicGroupId}
             </if>