|
@@ -460,12 +460,25 @@
|
|
|
</select>
|
|
|
|
|
|
<select id="findAllClassGroupByMusicGroup" resultMap="ClassGroup">
|
|
|
- SELECT * FROM class_group cg
|
|
|
+ SELECT
|
|
|
+ cg.id_,
|
|
|
+ cg.group_type_,
|
|
|
+ cg.music_group_id_,
|
|
|
+ cg.subject_id_list_,
|
|
|
+ cg.group_name_,
|
|
|
+ cg.name_,
|
|
|
+ cg.expect_student_num_,
|
|
|
+ COUNT(CASE cgsm.status_ WHEN 'NORMAL' THEN cgsm.user_id_ END) student_num_,
|
|
|
+ cg.type_,
|
|
|
+ cg.update_time_, cg.lock_flag_, cg.del_flag_, cg.total_class_times_, cg.current_class_times_, cg.img_, cg.create_time_, cg.memo_
|
|
|
+ FROM class_group cg
|
|
|
+ LEFT JOIN class_group_student_mapper cgsm ON cg.id_=cgsm.class_group_id_
|
|
|
WHERE cg.music_group_id_=#{musicGroupId} AND del_flag_ = '0'
|
|
|
AND cg.group_type_='MUSIC'
|
|
|
<if test="classGroupType != null">
|
|
|
AND cg.type_ = #{classGroupType}
|
|
|
</if>
|
|
|
+ GROUP BY cg.id_
|
|
|
</select>
|
|
|
|
|
|
<select id="queryTeacherIds" resultType="java.lang.Integer">
|