|
@@ -545,7 +545,7 @@
|
|
|
SELECT user_id_ FROM course_schedule_student_payment cssp
|
|
|
LEFT JOIN course_schedule cs ON cs.id_=cssp.course_schedule_id_
|
|
|
WHERE cssp.user_id_=su.id_ AND cs.teach_mode_='ONLINE'
|
|
|
- AND NOT EXISTS(SELECT student_id_ FROM practice_group WHERE cssp.music_group_id_=id_ AND cssp.group_type_='PRACTICE' AND type_!='TRIAL')
|
|
|
+ AND EXISTS(SELECT student_id_ FROM practice_group WHERE cssp.music_group_id_=id_ AND cssp.group_type_='PRACTICE' AND type_!='TRIAL')
|
|
|
AND CONCAT(cs.class_date_, ' ', cs.start_class_time_) > NOW()
|
|
|
)
|
|
|
ORDER BY su.id_
|
|
@@ -575,7 +575,7 @@
|
|
|
SELECT user_id_ FROM course_schedule_student_payment cssp
|
|
|
LEFT JOIN course_schedule cs ON cs.id_=cssp.course_schedule_id_
|
|
|
WHERE cssp.user_id_=su.id_ AND cs.teach_mode_='ONLINE'
|
|
|
- AND NOT EXISTS(SELECT student_id_ FROM practice_group WHERE cssp.music_group_id_=id_ AND cssp.group_type_='PRACTICE' AND type_!='TRIAL')
|
|
|
+ AND EXISTS(SELECT student_id_ FROM practice_group WHERE cssp.music_group_id_=id_ AND cssp.group_type_='PRACTICE' AND type_!='TRIAL')
|
|
|
AND CONCAT(cs.class_date_, ' ', cs.start_class_time_) > NOW()
|
|
|
)
|
|
|
</select>
|
|
@@ -680,4 +680,8 @@
|
|
|
<select id="checkStudentExitChargePractice" resultType="int">
|
|
|
SELECT COUNT(id_) FROM practice_group WHERE type_='CHARGE' AND student_id_=#{studentId} AND group_status_ IN ('NORMAL', 'FINISH')
|
|
|
</select>
|
|
|
+ <select id="countStudentIngTrialPractices" resultType="int">
|
|
|
+ SELECT COUNT(pg.id_) FROM practice_group pg LEFT JOIN course_schedule cs ON cs.music_group_id_=pg.id_
|
|
|
+ WHERE pg.student_id_=#{studentId} AND pg.type_='TRIAL' AND cs.group_type_='PRACTICE' AND CONCAT(cs.class_date_, ' ', cs.end_class_time_)>NOW()
|
|
|
+ </select>
|
|
|
</mapper>
|