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?