@ -2698,10 +2698,9 @@ class UsersController < ApplicationController
attachments=Attachment.where("id in (#{apply_ids.empty??'0':apply_ids.join(',')}) and container_type in(#{resource_type})").order("#{order.nil??'created_on':order}#{score}")
attachments=Attachment.where("id in (#{apply_ids.empty??'0':apply_ids.join(',')}) and container_type in(#{resource_type}) and (filename like :p)",:p=>search).order("#{order.nil??'created_on':order}#{score}")
end
# 获取我的课程资源中搜索结果
@ -2830,7 +2829,6 @@ class UsersController < ApplicationController
end
elsifparams[:type]=="2"# 私有资源
apply_ids=ApplyResource.where("user_id =? and status =?",params[:id],2).map{|ar|ar.attachment_id}