实训添加合作者的手机搜索

dev_forum
cxt 5 years ago
parent 7bd8ed383b
commit 6d535cd4bc

@ -662,8 +662,8 @@ class ShixunsController < ApplicationController
school_name = "%#{params[:school_name].to_s.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}'")
(LOWER(users.lastname) LIKE ? or users.phone like ?) AND LOWER(schools.name) LIKE
?", user_name, user_name, school_name)
else
@users = User.none
end

Loading…
Cancel
Save