From 4bc422568172be8aa12c7e2f25e7ecb97095df6f Mon Sep 17 00:00:00 2001 From: XuCheng642 <287102909@qq.com> Date: Sun, 17 Sep 2017 11:19:59 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=9E=E5=90=8D=E8=AE=A4=E8=AF=81=E5=92=8C?= =?UTF-8?q?=E8=81=8C=E4=B8=9A=E8=AE=A4=E8=AF=81=E6=90=9C=E7=B4=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/managements_controller.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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