|
@@ -485,7 +485,7 @@
|
|
|
</select>
|
|
|
|
|
|
<select id="findStudentAttendance" resultMap="StudentAttendance">
|
|
|
- SELECT cssp.course_schedule_id_,cssp.user_id_,cssp.group_type_,cssp.music_group_id_,sa.sign_in_time_,sa.sign_out_time_,sa.status_,
|
|
|
+ SELECT cssp.course_schedule_id_,cssp.user_id_,cssp.group_type_,cssp.music_group_id_,sa.sign_in_time_,sa.sign_out_time_,CASE WHEN sa.status_ IS NULL THEN 'TRUANT' ELSE sa.status_ END status_,
|
|
|
su.username_,su.phone_,su.avatar_,cs.teach_mode_,cs.type_ course_type_,o.name_ organ_name_,tu.real_name_ teacher_name_,cs.name_ course_schedule_name_,cs.status_ course_status_,
|
|
|
cs.actual_teacher_id_ teacher_id_,cs.class_date_ ,cs.start_class_time_,cs.end_class_time_ ,cs.new_course_id_
|
|
|
FROM course_schedule_student_payment cssp left join course_schedule cs on cs.id_ = cssp.course_schedule_id_
|
|
@@ -519,7 +519,11 @@
|
|
|
and cs.status_ = #{courseStatus,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler}
|
|
|
</if>
|
|
|
<if test="status != null">
|
|
|
- and sa.status_ = #{status,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler}
|
|
|
+ and (sa.status_ = #{status,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler}
|
|
|
+ <if test="status.code == 'TRUANT'">
|
|
|
+ OR sa.id_ IS NULL
|
|
|
+ </if>
|
|
|
+ )
|
|
|
</if>
|
|
|
<if test="groupType != null">
|
|
|
and cssp.group_type_ = #{groupType}
|
|
@@ -565,7 +569,11 @@
|
|
|
and cs.status_ = #{courseStatus,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler}
|
|
|
</if>
|
|
|
<if test="status != null">
|
|
|
- and sa.status_ = #{status,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler}
|
|
|
+ and (sa.status_ = #{status,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler}
|
|
|
+ <if test="status.code == 'TRUANT'">
|
|
|
+ OR sa.id_ IS NULL
|
|
|
+ </if>
|
|
|
+ )
|
|
|
</if>
|
|
|
<if test="groupType != null">
|
|
|
and cssp.group_type_ = #{groupType}
|