Browse Source

学校端支持查看学员练习情况

zouxuan 1 year ago
parent
commit
9530c69997
1 changed files with 6 additions and 12 deletions
  1. 6 12
      mec-biz/src/main/resources/config/mybatis/CourseScheduleMapper.xml

+ 6 - 12
mec-biz/src/main/resources/config/mybatis/CourseScheduleMapper.xml

@@ -4334,7 +4334,8 @@
 
 
     <sql id="selectPage">
-        <if test="param.teacherId != null">
+        <where>
+            <if test="param.teacherId != null">
                 and ( cs.actual_teacher_id_ = #{param.teacherId})
             </if>
             <if test="param.classType != null and param.classType != ''">
@@ -4372,6 +4373,7 @@
             <if test="param.versionTag !=null and param.versionTag != ''">
                 and (ch.version_tag_ = #{param.versionTag} or ch.version_tag_ is null)
             </if>
+        </where>
     </sql>
     <select id="queryTeacherServeHomeworkDetailV2"
             resultType="com.ym.mec.biz.dal.dto.CourseHomeworkWrapper$CourseHomeworkList">
@@ -4394,14 +4396,8 @@
         ch.expect_num_ as studentNum
         from course_schedule cs
         left join course_homework ch on cs.id_ = ch.course_schedule_id_
-
-        <where>
-            <include refid="selectPage"/>
-
-        </where>
-        <if test="param.offset != null">
-            limit #{param.offset},#{param.rows}
-        </if>
+        <include refid="selectPage"/>
+        <include refid="global.limit"></include>
     </select>
 
     <select id="countTeacherServeHomeworkDetailV2" resultType="int">
@@ -4409,9 +4405,7 @@
         count(1)
         from course_schedule cs
         left join course_homework ch on cs.id_ = ch.course_schedule_id_
-        <where>
-            <include refid="selectPage"/>
-        </where>
+        <include refid="selectPage"/>
     </select>
 
     <update id="updateTeachingPointByClassGroupId">