|
@@ -866,12 +866,12 @@
|
|
|
SELECT s.user_id_,su.username_,o.name_ organ_name_,
|
|
|
COUNT(CASE WHEN cssp.group_type_ = 'VIP' AND cs.status_ != 'NOT_START' THEN 1 ELSE NULL END) vip_over_num_,
|
|
|
COUNT(CASE WHEN cssp.group_type_ = 'VIP' AND cs.status_ = 'NOT_START' THEN 1 ELSE NULL END) vip_not_start_num_,
|
|
|
- GROUP_CONCAT(DISTINCT (CASE WHEN cssp.group_type_ = 'VIP' AND cs.status_ != 'NOT_START' THEN sut.id_ ELSE NULL END) ORDER BY cs.class_date_ ASC,start_class_time_ ASC) vip_over_teacher_ids_,
|
|
|
- GROUP_CONCAT(DISTINCT (CASE WHEN cssp.group_type_ = 'VIP' AND cs.status_ != 'NOT_START' THEN sut.real_name_ ELSE NULL END) ORDER BY cs.class_date_ ASC,start_class_time_ ASC) vip_over_teacher_names_,
|
|
|
+ GROUP_CONCAT(DISTINCT (CASE WHEN cssp.group_type_ = 'VIP' AND cs.status_ != 'NOT_START' THEN sut.id_ ELSE NULL END) ORDER BY cs.class_date_ DESC,start_class_time_ DESC) vip_over_teacher_ids_,
|
|
|
+ GROUP_CONCAT(DISTINCT (CASE WHEN cssp.group_type_ = 'VIP' AND cs.status_ != 'NOT_START' THEN sut.real_name_ ELSE NULL END) ORDER BY cs.class_date_ DESC,start_class_time_ DESC) vip_over_teacher_names_,
|
|
|
COUNT(CASE WHEN cssp.group_type_ = 'PRACTICE' AND cs.status_ != 'NOT_START' THEN 1 ELSE NULL END) practice_over_num_,
|
|
|
COUNT(CASE WHEN cssp.group_type_ = 'PRACTICE' AND cs.status_ = 'NOT_START' THEN 1 ELSE NULL END) practice_not_start_num_,
|
|
|
- GROUP_CONCAT(DISTINCT (CASE WHEN cssp.group_type_ = 'PRACTICE' AND cs.status_ != 'NOT_START' THEN sut.id_ ELSE NULL END) ORDER BY cs.class_date_ ASC,start_class_time_ ASC) practice_over_teacher_ids_,
|
|
|
- GROUP_CONCAT(DISTINCT (CASE WHEN cssp.group_type_ = 'PRACTICE' AND cs.status_ != 'NOT_START' THEN sut.real_name_ ELSE NULL END) ORDER BY cs.class_date_ ASC,start_class_time_ ASC) practice_over_teacher_names_,
|
|
|
+ GROUP_CONCAT(DISTINCT (CASE WHEN cssp.group_type_ = 'PRACTICE' AND cs.status_ != 'NOT_START' THEN sut.id_ ELSE NULL END) ORDER BY cs.class_date_ DESC,start_class_time_ DESC) practice_over_teacher_ids_,
|
|
|
+ GROUP_CONCAT(DISTINCT (CASE WHEN cssp.group_type_ = 'PRACTICE' AND cs.status_ != 'NOT_START' THEN sut.real_name_ ELSE NULL END) ORDER BY cs.class_date_ DESC,start_class_time_ DESC) practice_over_teacher_names_,
|
|
|
s.teacher_id_,ste.real_name_
|
|
|
FROM student s
|
|
|
LEFT JOIN course_schedule_student_payment cssp FORCE INDEX(group_type_) ON cssp.user_id_ = s.user_id_
|
|
@@ -882,8 +882,8 @@
|
|
|
LEFT JOIN organization o ON o.id_ = su.organ_id_
|
|
|
WHERE cssp.group_type_ IN ('VIP','PRACTICE')
|
|
|
<if test="organId != null">
|
|
|
- AND FIND_IN_SET(su.organ_id_,#{organId})
|
|
|
+ AND FIND_IN_SET(cs.organ_id_,#{organId})
|
|
|
</if>
|
|
|
- GROUP BY s.user_id_ ORDER BY cs.class_date_ ASC,start_class_time_ ASC
|
|
|
+ GROUP BY s.user_id_
|
|
|
</select>
|
|
|
</mapper>
|