From 944781887fd506f7e946491f0cd68bea0dd050d1 Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Wed, 1 Jul 2020 11:18:11 +0800 Subject: [PATCH] =?UTF-8?q?=E7=AB=9E=E8=B5=9B=E8=BF=90=E8=90=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/managements_controller.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/managements_controller.rb b/app/controllers/managements_controller.rb index 92173fc3..88027bb1 100644 --- a/app/controllers/managements_controller.rb +++ b/app/controllers/managements_controller.rb @@ -29,7 +29,7 @@ class ManagementsController < ApplicationController end def user_agents - @user_agents = UserAgent.where("user_agents.key is not null").order("action_status asc, register_status asc") + @user_agents = UserAgent.where("user_agents.key is not null and is_delete = 0").order("action_status asc, register_status asc") @agents_count = @user_agents.count limit = 20 @agents_pages = Paginator.new @agents_count, limit, params['page'] || 1 @@ -4386,7 +4386,7 @@ end sheet1.row(0).default_format = blue count_row = 1 sheet1.row(0).concat(["序号", "LoginId", "姓名", "学校名称", "手机号", "邮箱", "参赛人数", "参赛队伍", "访问量"]) - user_agents = UserAgent.where("user_agents.key is not null").pluck(:key).uniq + user_agents = UserAgent.where("user_agents.key is not null and is_delete = 0").pluck(:key).uniq user_agents.each_with_index do |agent, index| user = User.find_by_login(agent) next if user.blank?