添加合作者

dev_forum
daiao 5 years ago
parent 7ad97372dd
commit e1c40cd30d

@ -626,9 +626,13 @@ class ShixunsController < ApplicationController
member_ids = "(" + @shixun.shixun_members.map(&:user_id).join(',') + ")"
user_name = "%#{params[:user_name].strip}%"
school_name = "%#{params[:school_name].strip}%"
if user_name.present? || school_name.present?
@users = User.joins(user_extension: :school).where("users.id not in #{member_ids} AND users.status = 1 AND
LOWER(users.lastname) LIKE '#{user_name}' AND LOWER(schools.name) LIKE
'#{school_name}'")
else
@users = User.none
end
end
def shixun_members_added

Loading…
Cancel
Save