|
@@ -406,10 +406,15 @@
|
|
|
from live_room lr
|
|
|
WHERE live_state_ = 1 and type_ = 'temp'
|
|
|
group by lr.speaker_id_) a on a.speaker_id_ = t.user_id_
|
|
|
+ left join (select tft.teacher_id_,COUNT(DISTINCT tsp.course_type_) num from teacher_free_time tft
|
|
|
+ left join teacher_subject_price tsp ON tsp.teacher_id_ = tft.teacher_id_
|
|
|
+ group by tft.teacher_id_) tft ON tft.teacher_id_ = t.user_id_
|
|
|
+ left join (select create_by_,COUNT(DISTINCT create_by_) num from music_sheet where del_flag_ = 0 AND state_ = 1 AND source_type_ = 'TEACHER'
|
|
|
+ GROUP BY create_by_) ms ON ms.create_by_ = t.user_id_
|
|
|
where t.entry_flag_ = 1
|
|
|
and t.is_test_user_ = 0 AND t.lock_flag_ = 0
|
|
|
and find_in_set(#{subjectId}, t.subject_id_)
|
|
|
- order by tt.fans_num_ desc
|
|
|
+ order by tft.num desc ,ms.num DESC ,tt.fans_num_ desc
|
|
|
limit 10
|
|
|
</select>
|
|
|
|