名师列表排序

hjq_mail
huang 9 years ago
parent 6ccb79a210
commit 39c753fd25

@ -183,7 +183,8 @@ module OrganizationsHelper
end
def excellent_teachers
User.where("excellent_teacher =?",true)
User.find_by_sql("select u.*, ue.technical_title, ue.school_id,(select count(*) from courses where courses.tea_id = u.id) as course_count
from users u, user_extensions ue where u.id = ue.user_id and ue.identity=0 and u.excellent_teacher =1 order by course_count desc")
end
end

Loading…
Cancel
Save