zouxuan 5 лет назад
Родитель
Сommit
aaa44401ad

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

@@ -280,7 +280,7 @@
     <select id="findStudentCourseHomeworks" resultMap="StudentCourseHomeworkDtoMap">
         SELECT sch.attachments_,sch.is_replied_,sch.is_view_,sch.create_time_,su.username_,su.phone_,s.name_ subject_name_
         FROM course_schedule_student_payment cssp
-        LEFT JOIN student_course_homework sch ON sch.course_schedule_id_ = cssp.course_schedule_id_ AND cssp.user_id_ = sch.user_id_
+        LEFT JOIN student_course_homework sch ON sch.course_schedule_id_ = cssp.course_schedule_id_ AND cssp.user_id_ = sch.user_id_ AND sch.status_ = 1
         LEFT JOIN sys_user su ON cssp.user_id_ = su.id_
         LEFT JOIN student_registration sr ON cssp.music_group_id_ = sr.music_group_id_ AND cssp.user_id_ = sr.user_id_
         LEFT JOIN `subject` s ON s.id_ = sr.actual_subject_id_

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

@@ -675,7 +675,7 @@
         SELECT COUNT(id_) FROM student_attendance WHERE course_schedule_id_ = #{courseScheduleId} AND status_ = #{status}
     </select>
     <select id="countHomeworkNum" resultType="java.lang.Integer">
-        SELECT COUNT(id_) FROM student_course_homework WHERE course_schedule_id_ = #{courseScheduleId}
+        SELECT COUNT(id_) FROM student_course_homework WHERE course_schedule_id_ = #{courseScheduleId} AND status_ = 1
     </select>
     <select id="countRepliedNum" resultType="java.lang.Integer">
         SELECT COUNT(id_) FROM student_course_homework WHERE course_schedule_id_ = #{courseScheduleId} AND is_replied_ = 1