| 
					
				 | 
			
			
				@@ -152,6 +152,7 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     </select> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     <select id="liveBuyTotal" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             resultType="com.yonge.cooleshow.biz.dal.wrapper.TeacherIndexWrapper$CourseExposureTotal"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        select c.type,SUM(c.exposureNum),c.date from ( 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         select uod.good_type_ type,COUNT(distinct uod.order_no_) exposureNum, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                DATE_FORMAT(uod.create_time_,#{groupBy}) 'date' from user_order_detail uod 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         left join user_order uo ON uo.order_no_ = uod.order_no_ 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -161,7 +162,19 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         <if test="param.type != null and param.type != ''"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             and uod.good_type_ = #{param.type} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         </if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        group by DATE_FORMAT(uod.create_time_,#{groupBy}) order by 'date' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        group by DATE_FORMAT(uod.create_time_,#{groupBy}) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        UNION ALL 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        select uod.good_type_ type,COUNT(distinct uod.order_no_) exposureNum, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        DATE_FORMAT(uod.create_time_,#{groupBy}) 'date' from user_order_detail uod 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        left join user_order uo ON uo.order_no_ = uod.order_no_ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        left join video_lesson_group cg On cg.id_ = uod.biz_id_ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        where cg.teacher_id_ = #{param.teacherId} AND uo.status_ = 'PAID' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        AND DATE_FORMAT(uod.create_time_, '%Y-%m-%d') BETWEEN #{param.startTime} AND #{param.endTime} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        <if test="param.type != null and param.type != ''"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            and uod.good_type_ = #{param.type} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        </if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        group by DATE_FORMAT(uod.create_time_,#{groupBy})) c 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        group by c.date ORDER BY c.date 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     </select> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     <select id="videoBuyTotal" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             resultType="com.yonge.cooleshow.biz.dal.wrapper.TeacherIndexWrapper$CourseExposureTotal"> 
			 |