浏览代码

feat:教师端课程组搜索

Joburgess 4 年之前
父节点
当前提交
186ae19f96
共有 1 个文件被更改,包括 9 次插入9 次删除
  1. 9 9
      mec-biz/src/main/resources/config/mybatis/CourseScheduleMapper.xml

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

@@ -1384,13 +1384,13 @@
             <if test="onlyHistory!=null and onlyHistory==1">
                 AND CONCAT( cs.class_date_, ' ', cs.end_class_time_ )&lt;now()
             </if>
-            <if test="status!=null">
+            <if test="status!=null and status!=''">
                 AND cs.status_ = #{status}
             </if>
-            <if test="startClassDate!=null">
+            <if test="startClassDate!=null and startClassDate!=''">
                 AND cs.class_date_ &gt;= #{startClassDate}
             </if>
-            <if test="endClassDate!=null">
+            <if test="endClassDate!=null and endClassDate!=''">
                 AND cs.class_date_ &lt;= #{endClassDate}
             </if>
         </where>
@@ -1493,13 +1493,13 @@
         <if test="userId != null">
             AND sa.teacher_id_=#{userId}
         </if>
-        <if test="status!=null">
+        <if test="status!=null and status!=''">
             AND cs.status_ = #{status}
         </if>
-        <if test="startClassDate!=null">
+        <if test="startClassDate!=null and startClassDate!=''">
             AND cs.class_date_ &gt;= #{startClassDate}
         </if>
-        <if test="endClassDate!=null">
+        <if test="endClassDate!=null and endClassDate!=''">
             AND cs.class_date_ &lt;= #{endClassDate}
         </if>
         GROUP BY sa.course_schedule_id_
@@ -1527,13 +1527,13 @@
         <if test="userId != null">
             AND sa.teacher_id_=#{userId}
         </if>
-        <if test="status!=null">
+        <if test="status!=null and status!=''">
             AND cs.status_ = #{status}
         </if>
-        <if test="startClassDate!=null">
+        <if test="startClassDate!=null and startClassDate!=''">
             AND cs.class_date_ &gt;= #{startClassDate}
         </if>
-        <if test="endClassDate!=null">
+        <if test="endClassDate!=null and endClassDate!=''">
             AND cs.class_date_ &lt;= #{endClassDate}
         </if>
     </select>