|  | @@ -41,12 +41,12 @@
 | 
	
		
			
				|  |  |  		<result property="subjectName" column="subjectName"/>
 | 
	
		
			
				|  |  |  	</resultMap>
 | 
	
		
			
				|  |  |  	<select id="queryReport" resultMap="TeacherCloudCourseReportDto">
 | 
	
		
			
				|  |  | -		select tccr.teacher_id_,tccr.organ_id_,SUM(tccr.course_time_) course_time_,sum(tccr.play_time_) play_time_,sum(tccr.total_play_time_) total_play_time_,tccr.class_date_,
 | 
	
		
			
				|  |  | -		su.real_name_ teacherName,o.name_ organName,GROUP_CONCAT(distinct sb.name_) subjectName from teacher_cloud_course_report tccr
 | 
	
		
			
				|  |  | +		select t.teacher_id_, organ_id_, course_time_, play_time_, total_play_time_, class_date_, teacherName, organName,GROUP_CONCAT(distinct sb.name_) subjectName from (
 | 
	
		
			
				|  |  | +		select tccr.teacher_id_,tccr.organ_id_,SUM(tccr.course_time_) course_time_,sum(tccr.play_time_) play_time_,sum(tccr.total_play_time_) total_play_time_,tccr.class_date_,t.subject_id_,
 | 
	
		
			
				|  |  | +		su.real_name_ teacherName,o.name_ organName from teacher_cloud_course_report tccr
 | 
	
		
			
				|  |  |  		left join sys_user su ON su.id_ = tccr.teacher_id_
 | 
	
		
			
				|  |  |  		left join organization o ON o.id_ = tccr.organ_id_
 | 
	
		
			
				|  |  |  		left join teacher t ON t.id_ = tccr.teacher_id_
 | 
	
		
			
				|  |  | -		left join subject sb ON FIND_IN_SET(sb.id_,t.subject_id_)
 | 
	
		
			
				|  |  |  		<where>
 | 
	
		
			
				|  |  |  			<if test="startTime != null and startTime != ''">
 | 
	
		
			
				|  |  |  				AND tccr.class_date_ BETWEEN #{startTime} AND #{endTime}
 | 
	
	
		
			
				|  | @@ -62,7 +62,10 @@
 | 
	
		
			
				|  |  |  			</if>
 | 
	
		
			
				|  |  |  		</where>
 | 
	
		
			
				|  |  |  		group by tccr.teacher_id_
 | 
	
		
			
				|  |  | -		order by tccr.organ_id_
 | 
	
		
			
				|  |  | +		) t
 | 
	
		
			
				|  |  | +		left join subject sb ON FIND_IN_SET(sb.id_,t.subject_id_)
 | 
	
		
			
				|  |  | +		group by t.teacher_id_
 | 
	
		
			
				|  |  | +		order by t.organ_id_
 | 
	
		
			
				|  |  |  		<if test="sort != null and sort != ''">
 | 
	
		
			
				|  |  |  			,${sort} ${order}
 | 
	
		
			
				|  |  |  		</if>
 |