| 
					
				 | 
			
			
				@@ -488,7 +488,7 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         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_  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         FROM course_schedule_student_payment cssp left join course_schedule cs on cs.id_ = cssp.course_schedule_id_ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        left join student_attendance sa on cssp.course_schedule_id_ = sa.course_schedule_id_ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        left join student_attendance sa on cssp.course_schedule_id_ = sa.course_schedule_id_ and cssp.user_id_ = sa.user_id_ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         LEFT JOIN sys_user su ON cssp.user_id_ = su.id_ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         left join sys_user tu on tu.id_ = cs.actual_teacher_id_ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         left join organization o on o.id_ = cs.organ_id_ 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -497,7 +497,7 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         		cssp.course_schedule_id_ = #{courseScheduleId} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         	</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         	<if test="search != null"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        		cssp.course_schedule_id_ = #{search} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        		and cssp.course_schedule_id_ = #{search} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         	</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         	<if test="studentID != null"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         		and cssp.user_id_ = #{studentID} 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -534,13 +534,13 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     <select id="countStudentAttendance" resultType="java.lang.Integer"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         SELECT count(cssp.id_)  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         FROM course_schedule_student_payment cssp left join course_schedule cs on cs.id_ = cssp.course_schedule_id_ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        left join student_attendance sa on cssp.course_schedule_id_ = sa.course_schedule_id_ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        left join student_attendance sa on cssp.course_schedule_id_ = sa.course_schedule_id_ and cssp.user_id_ = sa.user_id_ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         <where> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         	<if test="courseScheduleId != null"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         		cssp.course_schedule_id_ = #{courseScheduleId} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         	</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         	<if test="search != null"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        		cssp.course_schedule_id_ = #{search} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        		and cssp.course_schedule_id_ = #{search} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         	</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         	<if test="studentID != null"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         		and cssp.user_id_ = #{studentID} 
			 |