| 
					
				 | 
			
			
				@@ -546,7 +546,6 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		<result property="num2" column="num2"/> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		<result property="num1" column="num1"/> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		<result property="num0" column="num0"/> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		<result property="num0" column="course_sum_"/> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	</resultMap> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	<select id="queryCourseConsumer" resultMap="StudentCourseConsumerDto"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		select o.id_ organ_id_,o.name_ organName,count(ss.user_id_) normalNum, 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -652,6 +651,9 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		<if test="organId != null and organId != ''"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			AND FIND_IN_SET(su.organ_id_,#{organId}) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		<if test="search != null and search != ''"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			AND (su.username_ LIKE CONCAT('%',#{search},'%') OR su.phone_ LIKE CONCAT('%',#{search},'%') OR su.id_ = #{search}) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	</select> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	<select id="queryPreCourseConsumerDetail" resultMap="StudentCourseConsumerDetailDto"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		select o.name_ organName,su.username_,ss.user_id_,su.phone_, 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -662,7 +664,7 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		left join ( 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		select cssp.user_id_,COUNT(distinct cssp.course_schedule_id_) course_num_ from course_schedule cs 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		left join course_schedule_student_payment cssp ON cssp.course_schedule_id_ = cs.id_ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		where DATE_FORMAT(cs.class_date_,'%Y-%m') BETWEEN #{startDate} AND #{endDate} AND cs.type_ = 'VIP' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		where DATE_FORMAT(cs.class_date_,'%Y-%m-%d') BETWEEN #{startDate} AND #{endDate} AND cs.type_ = 'VIP' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		<include refid="com.ym.mec.biz.dal.dao.CourseScheduleDao.courseIgnore"/> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		group by cssp.user_id_) cs ON ss.user_id_ = cs.user_id_ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		left join sys_user su ON su.id_ = ss.user_id_ 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -685,5 +687,8 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		<if test="organId != null and organId != ''"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			AND FIND_IN_SET(su.organ_id_,#{organId}) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		<if test="search != null and search != ''"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			AND (su.username_ LIKE CONCAT('%',#{search},'%') OR su.phone_ LIKE CONCAT('%',#{search},'%') OR su.id_ = #{search}) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	</select> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 </mapper> 
			 |