diff --git a/app/controllers/managements_controller.rb b/app/controllers/managements_controller.rb index f3191d99b..3d60ed6ec 100644 --- a/app/controllers/managements_controller.rb +++ b/app/controllers/managements_controller.rb @@ -1194,8 +1194,8 @@ end type = params[:type] || 0 # 存在type 就用type 没有就为 0 user_id = User.find_by_sql("select id from users where concat(lastname,firstname) like '%#{params[:name]}%'") - @unapproved_user = ApplyUserAuthentication.where(:status => @type, :user_id => user_id, :auth_type => 1).find_by_sql("SELECT s.*, TIMESTAMPDIFF(SECOND, s.updated_at, now()) diff FROM `apply_user_authentications` s order by diff asc") - # @unapproved_user = ApplyUserAuthentication.where(:status => @type, :user_id => user_id, :auth_type => 1).order("updated_at desc") + # @unapproved_user = ApplyUserAuthentication.where(:status => @type, :user_id => user_id, :auth_type => 1).find_by_sql("SELECT s.*, TIMESTAMPDIFF(SECOND, s.updated_at, now()) diff FROM `apply_user_authentications` s order by diff asc") + @unapproved_user = ApplyUserAuthentication.where(:status => @type, :user_id => user_id, :auth_type => 1).order("updated_at desc") @unapproved_user_count = @unapproved_user.count @limit = 15 @is_remote = true @@ -1214,8 +1214,8 @@ end @type = trial_authorization_status(params[:type]) type = params[:type] || 0 # 存在type 就用type 没有就为 0 user_id = User.find_by_sql("select id from users where concat(lastname,firstname) like '%#{params[:name]}%'") - @unapproved_user = ApplyUserAuthentication.where(:status => @type, :user_id => user_id, :auth_type => 2).find_by_sql("SELECT s.*, TIMESTAMPDIFF(SECOND, s.updated_at, now()) diff FROM `apply_user_authentications` s order by diff asc") - # @unapproved_user = ApplyUserAuthentication.where(:status => @type, :user_id => user_id, :auth_type => 2).order("updated_at desc") + # @unapproved_user = ApplyUserAuthentication.where(:status => @type, :user_id => user_id, :auth_type => 2).find_by_sql("SELECT s.*, TIMESTAMPDIFF(SECOND, s.updated_at, now()) diff FROM `apply_user_authentications` s order by diff asc") + @unapproved_user = ApplyUserAuthentication.where(:status => @type, :user_id => user_id, :auth_type => 2).order("updated_at desc") respond_to do |format| format.html format.js