yonge há 5 anos atrás
pai
commit
8f3cd0ae2e

+ 4 - 5
mec-biz/src/main/resources/config/mybatis/TeacherAttendanceMapper.xml

@@ -142,7 +142,7 @@
         <where>
             (cs.del_flag_ != 1 OR cs.del_flag_ IS NULL)
             <if test="teacherId != null">
-                and ta.teacher_id_ = #{teacherId}
+                and cs.actual_teacher_id_ = #{teacherId}
             </if>
             <if test="courseStartDate != null">
                 and cs.class_date_ &gt;= #{courseStartDate}
@@ -178,16 +178,15 @@
             IF(ta.sign_out_status_ IS NULL,3,ta.sign_out_status_) sign_out_status_,
             ta.remark_
         FROM
-            teacher_attendance ta
-        LEFT JOIN course_schedule cs ON ta.course_schedule_id_=cs.id_
+            course_schedule cs left join teacher_attendance ta  ON ta.course_schedule_id_=cs.id_
         <include refid="queryCondition"/>
         ORDER BY cs.class_date_ DESC,cs.start_class_time_ DESC
         <include refid="global.limit"/>
     </select>
 
     <select id="getTeacherPersonalAttendancesCount" resultType="int">
-        SELECT count(ta.id_) FROM teacher_attendance ta
-        LEFT JOIN course_schedule cs ON ta.course_schedule_id_=cs.id_
+        SELECT count(cs.id_) FROM course_schedule cs left join teacher_attendance ta
+        ON ta.course_schedule_id_=cs.id_
         <include refid="queryCondition"/>
     </select>