fix: concat nickname
This commit is contained in:
		
							parent
							
								
									d5a65112ca
								
							
						
					
					
						commit
						a5b98bcad4
					
				| 
						 | 
				
			
			@ -32,7 +32,7 @@ class Admins::AuthSchoolsController < Admins::BaseController
 | 
			
		|||
  def search_manager
 | 
			
		||||
    school = School.find_by(id: params[:school_id])
 | 
			
		||||
    user_ids = school&.ec_school_users&.pluck(:user_id)
 | 
			
		||||
    @users = User.where.not(id: user_ids).where("concat(lastname, firstname) like ?", "%#{params[:name].strip.to_s}%").limit(10)
 | 
			
		||||
    @users = User.where.not(id: user_ids).where("CONCAT_WS(lastname, firstname, nickname) like ?", "%#{params[:name].strip.to_s}%").limit(10)
 | 
			
		||||
  end
 | 
			
		||||
 | 
			
		||||
  # 添加认证学校管理员
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -32,7 +32,7 @@ class Admins::LaboratoriesController < Admins::BaseController
 | 
			
		|||
 | 
			
		||||
    keyword = params[:keyword].to_s.strip
 | 
			
		||||
    if keyword.present?
 | 
			
		||||
      like_sql = 'shixuns.name LIKE :keyword OR CONCAT(users.lastname, users.firstname) LIKE :keyword '\
 | 
			
		||||
      like_sql = 'shixuns.name LIKE :keyword OR CONCAT_WS(users.lastname, users.firstname, users.nickname) LIKE :keyword '\
 | 
			
		||||
                 'OR mirror_repositories.name LIKE :keyword'
 | 
			
		||||
      shixuns = shixuns.joins(:user, :mirror_repositories).where(like_sql, keyword: "%#{keyword}%")
 | 
			
		||||
    end
 | 
			
		||||
| 
						 | 
				
			
			@ -48,7 +48,7 @@ class Admins::LaboratoriesController < Admins::BaseController
 | 
			
		|||
 | 
			
		||||
    keyword = params[:keyword].to_s.strip
 | 
			
		||||
    if keyword.present?
 | 
			
		||||
      like_sql = 'subjects.name LIKE :keyword OR CONCAT(users.lastname, users.firstname) LIKE :keyword'
 | 
			
		||||
      like_sql = 'subjects.name LIKE :keyword OR CONCAT_WS(users.lastname, users.firstname, users.nickname) LIKE :keyword'
 | 
			
		||||
      subjects = subjects.joins(:user).where(like_sql, keyword: "%#{keyword}%")
 | 
			
		||||
    end
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -18,7 +18,7 @@ class MembersController < ApplicationController
 | 
			
		|||
    scope = @project.members.includes(:roles, user: :user_extension)
 | 
			
		||||
    search = params[:search].to_s.downcase
 | 
			
		||||
    role = params[:role].to_s
 | 
			
		||||
    scope = scope.joins(:user).where("LOWER(concat(users.lastname, users.firstname, users.login, users.mail)) LIKE ?", "%#{search.split(" ").join('|')}%") if search.present?
 | 
			
		||||
    scope = scope.joins(:user).where("LOWER(CONCAT_WS(users.lastname, users.firstname, users.login, users.mail, users.nickname)) LIKE ?", "%#{search.split(" ").join('|')}%") if search.present?
 | 
			
		||||
    scope = scope.joins(:roles).where("roles.name LIKE ?", "%#{role}%") if role.present?
 | 
			
		||||
 | 
			
		||||
    @total_count = scope.size
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -5,7 +5,7 @@ class Organizations::OrganizationUsersController < Organizations::BaseController
 | 
			
		|||
  def index
 | 
			
		||||
    @organization_users = @organization.organization_users.includes(:user)
 | 
			
		||||
    search = params[:search].to_s.downcase
 | 
			
		||||
    @organization_users = @organization_users.joins(:user).where("LOWER(CONCAT_WS(users.lastname, users.firstname, users.login, users.mail)) LIKE ?", "%#{search.split(" ").join('|')}%") if search.present?
 | 
			
		||||
    @organization_users = @organization_users.joins(:user).where("LOWER(CONCAT_WS(users.lastname, users.firstname, users.login, users.mail, users.nickname)) LIKE ?", "%#{search.split(" ").join('|')}%") if search.present?
 | 
			
		||||
 | 
			
		||||
    @organization_users = kaminari_paginate(@organization_users)
 | 
			
		||||
  end
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -63,7 +63,7 @@ class UsersController < ApplicationController
 | 
			
		|||
 | 
			
		||||
  def fan_users
 | 
			
		||||
    watchers = @user.watchers.includes(:user).order("watchers.created_at desc")
 | 
			
		||||
    watchers = watchers.joins(:user).where("LOWER(concat(users.lastname, users.firstname, users.login)) LIKE ?", "%#{params[:search].split(" ").join('|')}%") if params[:search].present?
 | 
			
		||||
    watchers = watchers.joins(:user).where("LOWER(CONCAT_WS(users.lastname, users.firstname, users.login, users.nickname)) LIKE ?", "%#{params[:search].split(" ").join('|')}%") if params[:search].present?
 | 
			
		||||
 | 
			
		||||
    @watchers_count = watchers.size
 | 
			
		||||
    @watchers = paginate(watchers)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -11,7 +11,7 @@ class UsersForPrivateMessagesController < ApplicationController
 | 
			
		|||
      return
 | 
			
		||||
    end
 | 
			
		||||
 | 
			
		||||
    users = users.where('LOWER(concat(lastname, firstname, nickname)) LIKE ?', "%#{keyword}%")
 | 
			
		||||
    users = users.where('LOWER(CONCAT_WS(lastname, firstname, nickname)) LIKE ?', "%#{keyword}%")
 | 
			
		||||
 | 
			
		||||
    @users = users.limit(10).includes(:user_extension)
 | 
			
		||||
  end
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -86,7 +86,7 @@ class Weapps::CoursesController < Weapps::BaseController
 | 
			
		|||
    end
 | 
			
		||||
 | 
			
		||||
    if search.present?
 | 
			
		||||
      @teacher_list = @teacher_list.joins(:user).where("LOWER(CONCAT(users.lastname, users.firstname)) like ?", "%#{search}%")
 | 
			
		||||
      @teacher_list = @teacher_list.joins(:user).where("LOWER(CONCAT_WS(users.lastname, users.firstname, users.nickname)) like ?", "%#{search}%")
 | 
			
		||||
    end
 | 
			
		||||
 | 
			
		||||
    @teacher_list_size = @teacher_list.size
 | 
			
		||||
| 
						 | 
				
			
			@ -127,7 +127,7 @@ class Weapps::CoursesController < Weapps::BaseController
 | 
			
		|||
    @students = CourseMember.students(@course)
 | 
			
		||||
 | 
			
		||||
    if search.present?
 | 
			
		||||
      @students = @students.joins(user: :user_extension).where("LOWER(CONCAT(users.lastname, users.firstname)) like ? or
 | 
			
		||||
      @students = @students.joins(user: :user_extension).where("LOWER(CONCAT_WS(users.lastname, users.firstname, users.nickname)) like ? or
 | 
			
		||||
                                                        user_extensions.student_id like ?", "%#{search}%", "%#{search}%")
 | 
			
		||||
    end
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -86,7 +86,7 @@ class ZipsController < ApplicationController
 | 
			
		|||
 | 
			
		||||
          #搜索
 | 
			
		||||
          if params[:search].present?
 | 
			
		||||
            @ex_users = @ex_users.joins(user: :user_extension).where("CONCAT(lastname, firstname) like ? OR student_id like ?", "%#{params[:search]}%", "%#{params[:search]}%")
 | 
			
		||||
            @ex_users = @ex_users.joins(user: :user_extension).where("CONCAT_WS(lastname, firstname, nickname) like ? OR student_id like ?", "%#{params[:search]}%", "%#{params[:search]}%")
 | 
			
		||||
          end
 | 
			
		||||
 | 
			
		||||
          default_ex_users_size = @ex_users&.size
 | 
			
		||||
| 
						 | 
				
			
			@ -130,7 +130,7 @@ class ZipsController < ApplicationController
 | 
			
		|||
      end
 | 
			
		||||
 | 
			
		||||
      unless params[:search].blank?
 | 
			
		||||
        @all_student_works = @all_student_works.joins(user: :user_extension).where("concat(lastname, firstname) like ?
 | 
			
		||||
        @all_student_works = @all_student_works.joins(user: :user_extension).where("CONCAT_WS(lastname, firstname, nickname) like ?
 | 
			
		||||
                         or student_id like ?", "%#{params[:search]}%", "%#{params[:search]}%")
 | 
			
		||||
      end
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,42 +1,42 @@
 | 
			
		|||
# == Schema Information
 | 
			
		||||
#
 | 
			
		||||
# Table name: attachments
 | 
			
		||||
#
 | 
			
		||||
#  id                        :integer          not null, primary key
 | 
			
		||||
#  container_id              :integer
 | 
			
		||||
#  container_type            :string(30)
 | 
			
		||||
#  filename                  :string(255)      default(""), not null
 | 
			
		||||
#  disk_filename             :string(255)      default(""), not null
 | 
			
		||||
#  filesize                  :integer          default("0"), not null
 | 
			
		||||
#  content_type              :string(255)      default("")
 | 
			
		||||
#  digest                    :string(60)       default(""), not null
 | 
			
		||||
#  downloads                 :integer          default("0"), not null
 | 
			
		||||
#  author_id                 :integer          default("0"), not null
 | 
			
		||||
#  created_on                :datetime
 | 
			
		||||
#  description               :text(65535)
 | 
			
		||||
#  disk_directory            :string(255)
 | 
			
		||||
#  attachtype                :integer          default("1")
 | 
			
		||||
#  is_public                 :integer          default("1")
 | 
			
		||||
#  copy_from                 :integer
 | 
			
		||||
#  quotes                    :integer          default("0")
 | 
			
		||||
#  is_publish                :integer          default("1")
 | 
			
		||||
#  publish_time              :datetime
 | 
			
		||||
#  resource_bank_id          :integer
 | 
			
		||||
#  unified_setting           :boolean          default("1")
 | 
			
		||||
#  cloud_url                 :string(255)      default("")
 | 
			
		||||
#  course_second_category_id :integer          default("0")
 | 
			
		||||
#  delay_publish             :boolean          default("0")
 | 
			
		||||
#
 | 
			
		||||
# Indexes
 | 
			
		||||
#
 | 
			
		||||
#  index_attachments_on_author_id                        (author_id)
 | 
			
		||||
#  index_attachments_on_container_id_and_container_type  (container_id,container_type)
 | 
			
		||||
#  index_attachments_on_course_second_category_id        (course_second_category_id)
 | 
			
		||||
#  index_attachments_on_created_on                       (created_on)
 | 
			
		||||
#  index_attachments_on_is_public                        (is_public)
 | 
			
		||||
#  index_attachments_on_quotes                           (quotes)
 | 
			
		||||
#
 | 
			
		||||
 | 
			
		||||
# == Schema Information
 | 
			
		||||
#
 | 
			
		||||
# Table name: attachments
 | 
			
		||||
#
 | 
			
		||||
#  id                        :integer          not null, primary key
 | 
			
		||||
#  container_id              :integer
 | 
			
		||||
#  container_type            :string(30)
 | 
			
		||||
#  filename                  :string(255)      default(""), not null
 | 
			
		||||
#  disk_filename             :string(255)      default(""), not null
 | 
			
		||||
#  filesize                  :integer          default("0"), not null
 | 
			
		||||
#  content_type              :string(255)      default("")
 | 
			
		||||
#  digest                    :string(60)       default(""), not null
 | 
			
		||||
#  downloads                 :integer          default("0"), not null
 | 
			
		||||
#  author_id                 :integer          default("0"), not null
 | 
			
		||||
#  created_on                :datetime
 | 
			
		||||
#  description               :text(65535)
 | 
			
		||||
#  disk_directory            :string(255)
 | 
			
		||||
#  attachtype                :integer          default("1")
 | 
			
		||||
#  is_public                 :integer          default("1")
 | 
			
		||||
#  copy_from                 :integer
 | 
			
		||||
#  quotes                    :integer          default("0")
 | 
			
		||||
#  is_publish                :integer          default("1")
 | 
			
		||||
#  publish_time              :datetime
 | 
			
		||||
#  resource_bank_id          :integer
 | 
			
		||||
#  unified_setting           :boolean          default("1")
 | 
			
		||||
#  cloud_url                 :string(255)      default("")
 | 
			
		||||
#  course_second_category_id :integer          default("0")
 | 
			
		||||
#  delay_publish             :boolean          default("0")
 | 
			
		||||
#
 | 
			
		||||
# Indexes
 | 
			
		||||
#
 | 
			
		||||
#  index_attachments_on_author_id                        (author_id)
 | 
			
		||||
#  index_attachments_on_container_id_and_container_type  (container_id,container_type)
 | 
			
		||||
#  index_attachments_on_course_second_category_id        (course_second_category_id)
 | 
			
		||||
#  index_attachments_on_created_on                       (created_on)
 | 
			
		||||
#  index_attachments_on_is_public                        (is_public)
 | 
			
		||||
#  index_attachments_on_quotes                           (quotes)
 | 
			
		||||
#
 | 
			
		||||
 | 
			
		||||
class Attachment < ApplicationRecord
 | 
			
		||||
  include BaseModel
 | 
			
		||||
  include Publicable
 | 
			
		||||
| 
						 | 
				
			
			@ -51,7 +51,7 @@ class Attachment < ApplicationRecord
 | 
			
		|||
  # 二级目录
 | 
			
		||||
  # belongs_to :course_second_category, optional: true
 | 
			
		||||
 | 
			
		||||
  scope :by_filename_or_user_name,      -> (keywords) { joins(:author).where("filename like :search or LOWER(concat(users.lastname, users.firstname)) LIKE :search",
 | 
			
		||||
  scope :by_filename_or_user_name,      -> (keywords) { joins(:author).where("filename like :search or LOWER(CONCAT_WS(users.lastname, users.firstname, users.nickname)) LIKE :search",
 | 
			
		||||
                                                        :search => "%#{keywords.split(" ").join('|')}%") unless keywords.blank? }
 | 
			
		||||
  scope :by_keywords,                   -> (keywords) { where("filename LIKE ?", "%#{keywords.split(" ").join('|')}%") unless keywords.blank? }
 | 
			
		||||
  scope :ordered,                       -> (opts = {}) { order("#{opts[:sort_type]} #{opts[:sort] == 1 ? 'asc': 'desc'}") }
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -170,7 +170,7 @@ class User < Owner
 | 
			
		|||
  # Groups and active users
 | 
			
		||||
  scope :active, lambda { where(status: STATUS_ACTIVE) }
 | 
			
		||||
  scope :like, lambda { |keywords|
 | 
			
		||||
    sql = "CONCAT(lastname, firstname) LIKE :search OR login LIKE :search OR mail LIKE :search OR nickname LIKE :search"
 | 
			
		||||
    sql = "CONCAT_WS(lastname, firstname, nickname) LIKE :search OR login LIKE :search OR mail LIKE :search OR nickname LIKE :search"
 | 
			
		||||
    where(sql, :search => "%#{keywords.split(" ").join('|')}%") unless keywords.blank?
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -26,7 +26,7 @@ class Admins::ApplyItemBankQuery < ApplicationQuery
 | 
			
		|||
    keyword = params[:keyword].to_s.strip
 | 
			
		||||
    if keyword.present?
 | 
			
		||||
      applies = applies.joins(user: { user_extension: :school })
 | 
			
		||||
                  .where('CONCAT(lastname,firstname) LIKE :keyword OR schools.name LIKE :keyword', keyword: "%#{keyword}%")
 | 
			
		||||
                  .where('CONCAT_WS(lastname,firstname, nickname) LIKE :keyword OR schools.name LIKE :keyword', keyword: "%#{keyword}%")
 | 
			
		||||
    end
 | 
			
		||||
 | 
			
		||||
    custom_sort(applies, params[:sort_by], params[:sort_direction])
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -26,7 +26,7 @@ class Admins::ApplyUserAuthenticationQuery < ApplicationQuery
 | 
			
		|||
    keyword = params[:keyword].to_s.strip
 | 
			
		||||
    if keyword.present?
 | 
			
		||||
      applies = applies.joins(user: { user_extension: :school })
 | 
			
		||||
                  .where('CONCAT(lastname,firstname) LIKE :keyword OR schools.name LIKE :keyword', keyword: "%#{keyword}%")
 | 
			
		||||
                  .where('CONCAT_WS(lastname,firstname,nickname) LIKE :keyword OR schools.name LIKE :keyword', keyword: "%#{keyword}%")
 | 
			
		||||
    end
 | 
			
		||||
 | 
			
		||||
    custom_sort(applies, params[:sort_by], params[:sort_direction])
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -19,7 +19,7 @@ class Admins::CourseListQuery < ApplicationQuery
 | 
			
		|||
      case search_type
 | 
			
		||||
      when "0"
 | 
			
		||||
        course_lists = course_lists.joins(:user)
 | 
			
		||||
                      .where('CONCAT(lastname, firstname) like :keyword', keyword: "%#{keyword}%")
 | 
			
		||||
                      .where('CONCAT_WS(lastname, firstname, nickname) like :keyword', keyword: "%#{keyword}%")
 | 
			
		||||
      when "1"
 | 
			
		||||
        course_lists = course_lists.where('name like :keyword', keyword: "%#{keyword}%")
 | 
			
		||||
      end
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -35,7 +35,7 @@ class Admins::CourseQuery < ApplicationQuery
 | 
			
		|||
    # 关键字
 | 
			
		||||
    keyword = params[:keyword].to_s.strip
 | 
			
		||||
    if keyword
 | 
			
		||||
      sql = 'CONCAT(lastname, firstname) LIKE :keyword OR courses.name LIKE :keyword OR course_lists.name LIKE :keyword'
 | 
			
		||||
      sql = 'CONCAT_WS(lastname, firstname, nickname) LIKE :keyword OR courses.name LIKE :keyword OR course_lists.name LIKE :keyword'
 | 
			
		||||
      courses = courses.joins(:teacher, :course_list).where(sql, keyword: "%#{keyword}%")
 | 
			
		||||
    end
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -11,7 +11,7 @@ class Admins::LaboratoryShixunQuery < ApplicationQuery
 | 
			
		|||
 | 
			
		||||
    keyword = params[:keyword].to_s.strip
 | 
			
		||||
    if keyword.present?
 | 
			
		||||
      like_sql = 'shixuns.name LIKE :keyword OR CONCAT(users.lastname, users.firstname) LIKE :keyword'
 | 
			
		||||
      like_sql = 'shixuns.name LIKE :keyword OR CONCAT_WS(users.lastname, users.firstname, users.nickname) LIKE :keyword'
 | 
			
		||||
      laboratory_shixuns = laboratory_shixuns.joins(shixun: :user).where(like_sql, keyword: "%#{keyword}%")
 | 
			
		||||
    end
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -11,7 +11,7 @@ class Admins::LaboratorySubjectQuery < ApplicationQuery
 | 
			
		|||
 | 
			
		||||
    keyword = params[:keyword].to_s.strip
 | 
			
		||||
    if keyword.present?
 | 
			
		||||
      like_sql = 'subjects.name LIKE :keyword OR CONCAT(users.lastname, users.firstname) LIKE :keyword'
 | 
			
		||||
      like_sql = 'subjects.name LIKE :keyword OR CONCAT_WS(users.lastname, users.firstname, users.nickname) LIKE :keyword'
 | 
			
		||||
      laboratory_subjects = laboratory_subjects.joins(subject: :user).where(like_sql, keyword: "%#{keyword}%")
 | 
			
		||||
    end
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -40,7 +40,7 @@ class Admins::SubjectQuery < ApplicationQuery
 | 
			
		|||
    # 关键字
 | 
			
		||||
    keyword = params[:keyword].to_s.strip
 | 
			
		||||
    if keyword
 | 
			
		||||
      sql = 'CONCAT(lastname, firstname) LIKE :keyword OR subjects.name LIKE :keyword'
 | 
			
		||||
      sql = 'CONCAT_WS(lastname, firstname, nickname) LIKE :keyword OR subjects.name LIKE :keyword'
 | 
			
		||||
      subjects = subjects.joins(:user).where(sql, keyword: "%#{keyword}%")
 | 
			
		||||
    end
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -30,14 +30,14 @@ class Admins::UserQuery < ApplicationQuery
 | 
			
		|||
    # 关键字检索
 | 
			
		||||
    keyword = params[:keyword].to_s.strip.presence
 | 
			
		||||
    if keyword
 | 
			
		||||
      sql = 'CONCAT(lastname, firstname) LIKE :keyword OR login LIKE :keyword OR mail LIKE :keyword OR phone LIKE :keyword'
 | 
			
		||||
      sql = 'CONCAT_WS(lastname, firstname, nickname) LIKE :keyword OR login LIKE :keyword OR mail LIKE :keyword OR phone LIKE :keyword'
 | 
			
		||||
      users = users.where(sql, keyword: "%#{keyword}%")
 | 
			
		||||
    end
 | 
			
		||||
 | 
			
		||||
    # 姓名
 | 
			
		||||
    name = params[:name].to_s.strip.presence
 | 
			
		||||
    if name.present?
 | 
			
		||||
      users = users.where('CONCAT(lastname, firstname) LIKE :name', name: "%#{name}%")
 | 
			
		||||
      users = users.where('CONCAT_WS(lastname, firstname, nickname) LIKE :name', name: "%#{name}%")
 | 
			
		||||
    end
 | 
			
		||||
 | 
			
		||||
    # 单位ID
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -10,7 +10,7 @@ class UserQuery < ApplicationQuery
 | 
			
		|||
 | 
			
		||||
    # 真实姓名
 | 
			
		||||
    if name = strip_param(:name)
 | 
			
		||||
      users = users.where('LOWER(CONCAT(users.lastname, users.firstname)) LIKE ?', "%#{name.downcase}%")
 | 
			
		||||
      users = users.where('LOWER(CONCAT_WS(users.lastname, users.firstname, users.nickname)) LIKE ?', "%#{name.downcase}%")
 | 
			
		||||
    end
 | 
			
		||||
 | 
			
		||||
    # 单位名称
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -84,7 +84,7 @@ class Admins::ImportUserService < ApplicationService
 | 
			
		|||
    if data.identity.to_i == 1
 | 
			
		||||
      users = users.where(user_extensions: { student_id: data.student_id })
 | 
			
		||||
    else
 | 
			
		||||
      users = users.where(user_extensions: { technical_title: data.technical_title }).where('CONCAT(users.lastname,users.firstname) = ?', data.name)
 | 
			
		||||
      users = users.where(user_extensions: { technical_title: data.technical_title }).where('CONCAT_WS(users.lastname,users.firstname,users.nickname) = ?', data.name)
 | 
			
		||||
    end
 | 
			
		||||
 | 
			
		||||
    users.first
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue