|  | @@ -1550,6 +1550,9 @@
 | 
											
												
													
														|  |      <sql id="queryClassGroupPageSql">
 |  |      <sql id="queryClassGroupPageSql">
 | 
											
												
													
														|  |          <where>
 |  |          <where>
 | 
											
												
													
														|  |              cg.group_type_ = #{groupType} AND cg.del_flag_ = 0 AND cg.tenant_id_ = #{tenantId}
 |  |              cg.group_type_ = #{groupType} AND cg.del_flag_ = 0 AND cg.tenant_id_ = #{tenantId}
 | 
											
												
													
														|  | 
 |  | +            <if test="mainTeacherUserId != null">
 | 
											
												
													
														|  | 
 |  | +                AND cgtm.user_id_ = #{mainTeacherUserId}
 | 
											
												
													
														|  | 
 |  | +            </if>
 | 
											
												
													
														|  |              <if test="type != null">
 |  |              <if test="type != null">
 | 
											
												
													
														|  |                  AND type_ = #{type,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler}
 |  |                  AND type_ = #{type,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler}
 | 
											
												
													
														|  |              </if>
 |  |              </if>
 | 
											
										
											
												
													
														|  | @@ -1572,6 +1575,7 @@
 | 
											
												
													
														|  |      </sql>
 |  |      </sql>
 | 
											
												
													
														|  |      <select id="countClassGroup" resultType="int">
 |  |      <select id="countClassGroup" resultType="int">
 | 
											
												
													
														|  |          SELECT COUNT(cg.id_) FROM class_group cg
 |  |          SELECT COUNT(cg.id_) FROM class_group cg
 | 
											
												
													
														|  | 
 |  | +        left join class_group_teacher_mapper cgtm on cgtm.class_group_id_ = cg.id_ and cgtm.teacher_role_ = 'BISHOP'
 | 
											
												
													
														|  |          <if test="groupType == 'MUSIC'">
 |  |          <if test="groupType == 'MUSIC'">
 | 
											
												
													
														|  |              LEFT JOIN music_group mg ON mg.id_ = cg.music_group_id_
 |  |              LEFT JOIN music_group mg ON mg.id_ = cg.music_group_id_
 | 
											
												
													
														|  |          </if>
 |  |          </if>
 | 
											
										
											
												
													
														|  | @@ -1585,6 +1589,7 @@
 | 
											
												
													
														|  |      </select>
 |  |      </select>
 | 
											
												
													
														|  |      <select id="queryClassGroupPage" resultMap="ClassGroupTeachers">
 |  |      <select id="queryClassGroupPage" resultMap="ClassGroupTeachers">
 | 
											
												
													
														|  |          SELECT cg.*,mg.name_ music_group_name_,o.name_ organName FROM class_group cg
 |  |          SELECT cg.*,mg.name_ music_group_name_,o.name_ organName FROM class_group cg
 | 
											
												
													
														|  | 
 |  | +        left join class_group_teacher_mapper cgtm on cgtm.class_group_id_ = cg.id_ and cgtm.teacher_role_ = 'BISHOP'
 | 
											
												
													
														|  |          <if test="groupType == 'MUSIC'">
 |  |          <if test="groupType == 'MUSIC'">
 | 
											
												
													
														|  |              LEFT JOIN music_group mg ON mg.id_ = cg.music_group_id_
 |  |              LEFT JOIN music_group mg ON mg.id_ = cg.music_group_id_
 | 
											
												
													
														|  |          </if>
 |  |          </if>
 |