签到详情列表的排序

video_log
cxt 5 years ago
parent 87915fb350
commit cc97fb663b

@ -9,7 +9,7 @@ class Weapps::CourseMemberAttendancesController < ApplicationController
@member_attendances = @member_attendances.joins(:course_member).where(course_members: {course_group_id: params[:group_ids]})
end
@member_attendances = @member_attendances.where(attendance_status: params[:attendance_status]) if params[:attendance_status].present?
@member_attendances = @member_attendances.joins(user: :user_extension).order("user_extensions.student_id asc")
@member_attendances = @member_attendances.joins(user: :user_extension).order("attendance_status=1 desc, course_member_attendances.updated_at desc, user_extensions.student_id asc")
@member_attendances = paginate @member_attendances.preload(user: :user_extension)
end

Loading…
Cancel
Save