|  | @@ -1923,64 +1923,12 @@
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      <sql id="endFindCourseSchedulesCondition">
 | 
	
		
			
				|  |  |          <where>
 | 
	
		
			
				|  |  | -            <if test="search != null">
 | 
	
		
			
				|  |  | -                AND (cs.name_ LIKE CONCAT('%',#{search},'%') OR cs.id_ = #{search}
 | 
	
		
			
				|  |  | -                  <if test="groups != null and groupId==null">
 | 
	
		
			
				|  |  | -                      OR cs.music_group_id_ IN
 | 
	
		
			
				|  |  | -                      <foreach collection="groups" item="group" open="(" close=")" separator=",">
 | 
	
		
			
				|  |  | -                          #{group.id}
 | 
	
		
			
				|  |  | -                      </foreach>
 | 
	
		
			
				|  |  | -                  </if>
 | 
	
		
			
				|  |  | -                  <if test="courseIds != null and groupId==null">
 | 
	
		
			
				|  |  | -                    OR cs.id_ IN
 | 
	
		
			
				|  |  | -                    <foreach collection="courseIds" item="courseId" open="(" close=")" separator=",">
 | 
	
		
			
				|  |  | -                        #{courseId}
 | 
	
		
			
				|  |  | -                    </foreach>
 | 
	
		
			
				|  |  | -                  </if>
 | 
	
		
			
				|  |  | -                )
 | 
	
		
			
				|  |  | -            </if>
 | 
	
		
			
				|  |  | -            <if test="groups != null and groupId!=null">
 | 
	
		
			
				|  |  | -                AND cs.music_group_id_ IN
 | 
	
		
			
				|  |  | -                <foreach collection="groups" item="group" open="(" close=")" separator=",">
 | 
	
		
			
				|  |  | -                    #{group.id}
 | 
	
		
			
				|  |  | -                </foreach>
 | 
	
		
			
				|  |  | -            </if>
 | 
	
		
			
				|  |  | -            <if test="courseIds != null and groupId!=null">
 | 
	
		
			
				|  |  | +            <if test="courseScheduleIds != null">
 | 
	
		
			
				|  |  |                  AND cs.id_ IN
 | 
	
		
			
				|  |  | -                <foreach collection="courseIds" item="courseId" open="(" close=")" separator=",">
 | 
	
		
			
				|  |  | +                <foreach collection="courseScheduleIds" item="courseId" open="(" close=")" separator=",">
 | 
	
		
			
				|  |  |                      #{courseId}
 | 
	
		
			
				|  |  |                  </foreach>
 | 
	
		
			
				|  |  |              </if>
 | 
	
		
			
				|  |  | -            <if test="teacherIdList != null">
 | 
	
		
			
				|  |  | -                AND FIND_IN_SET(cs.actual_teacher_id_,#{teacherIdList})
 | 
	
		
			
				|  |  | -            </if>
 | 
	
		
			
				|  |  | -            <if test="groupType != null">
 | 
	
		
			
				|  |  | -                AND cs.group_type_=#{groupType, typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler}
 | 
	
		
			
				|  |  | -            </if>
 | 
	
		
			
				|  |  | -            <if test="groupId != null">
 | 
	
		
			
				|  |  | -                AND cs.music_group_id_=#{groupId}
 | 
	
		
			
				|  |  | -            </if>
 | 
	
		
			
				|  |  | -            <if test="classGroupId != null">
 | 
	
		
			
				|  |  | -                AND cs.class_group_id_=#{classGroupId}
 | 
	
		
			
				|  |  | -            </if>
 | 
	
		
			
				|  |  | -            <if test="startTime!=null and endTime==null">
 | 
	
		
			
				|  |  | -                AND cs.class_date_ > DATE_FORMAT(#{startTime},"%Y-%m-%d")
 | 
	
		
			
				|  |  | -            </if>
 | 
	
		
			
				|  |  | -            <if test="startTime==null and endTime!=null">
 | 
	
		
			
				|  |  | -                AND cs.class_date_ < DATE_FORMAT(#{endTime},"%Y-%m-%d")
 | 
	
		
			
				|  |  | -            </if>
 | 
	
		
			
				|  |  | -            <if test="startTime!=null and endTime!=null">
 | 
	
		
			
				|  |  | -                AND cs.class_date_ BETWEEN DATE_FORMAT(#{startTime},"%Y-%m-%d") AND DATE_FORMAT(#{endTime},"%Y-%m-%d")
 | 
	
		
			
				|  |  | -            </if>
 | 
	
		
			
				|  |  | -            <if test="courseStatus!=null">
 | 
	
		
			
				|  |  | -                AND cs.status_ = #{courseStatus,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler}
 | 
	
		
			
				|  |  | -            </if>
 | 
	
		
			
				|  |  | -            <if test="courseType!=null">
 | 
	
		
			
				|  |  | -                AND cs.type_ = #{courseType,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler}
 | 
	
		
			
				|  |  | -            </if>
 | 
	
		
			
				|  |  | -            <if test="schoolId!=null">
 | 
	
		
			
				|  |  | -                AND cs.schoole_id_ = #{schoolId}
 | 
	
		
			
				|  |  | -            </if>
 | 
	
		
			
				|  |  |          </where>
 | 
	
		
			
				|  |  |      </sql>
 | 
	
		
			
				|  |  |  
 |