|
@@ -257,10 +257,9 @@
|
|
|
</resultMap>
|
|
|
<select id="queryStudentSubTotalCourseTimes" resultMap="StudentSubTotalCourseTimesDto">
|
|
|
SELECT mgpscd.user_id_,su.username_,su.phone_,mgpscd.course_type_ 'key',
|
|
|
- SUM(CASE WHEN mgpscd.used_course_minutes_ = 0 THEN mgpscd.total_course_minutes_ ELSE 0 END) 'value',GROUP_CONCAT(DISTINCT cgsm.class_group_id_) class_group_id_
|
|
|
+ SUM(CASE WHEN mgpscd.used_course_minutes_ = 0 THEN mgpscd.total_course_minutes_ ELSE 0 END) 'value'
|
|
|
FROM music_group_payment_student_course_detail mgpscd
|
|
|
LEFT JOIN music_group_payment_calender mgpc ON mgpc.id_ = mgpscd.music_group_payment_calender_id_
|
|
|
- LEFT JOIN class_group_student_mapper cgsm ON cgsm.music_group_id_ = mgpc.music_group_id_ AND cgsm.status_ = 'NORMAL' AND mgpscd.user_id_ = cgsm.user_id_
|
|
|
LEFT JOIN sys_user su ON su.id_ = mgpscd.user_id_
|
|
|
WHERE mgpc.music_group_id_ = #{musicGroupId}
|
|
|
GROUP BY mgpscd.user_id_,mgpscd.course_type_
|