diff --git a/app/controllers/files_controller.rb b/app/controllers/files_controller.rb index cf94da8d9..7ec796b61 100644 --- a/app/controllers/files_controller.rb +++ b/app/controllers/files_controller.rb @@ -256,6 +256,13 @@ class FilesController < ApplicationController @order = "" @is_remote = false if params[:project_id] + # 更新资源申请消息为已读 + # ar_ids = ApplyResource.where("user_id =? and container_id =? and container_type =?", User.current.id, params[:project_id].to_i, "Project").map{|ar| ar.id} + # cms = CourseMessage.where("course_message_type =? and user_id =? and course_message_id in (#{ar_ids.empty? ? '0': ar_ids.join(',')})", "ApplyResource", User.current.id) + # cms.each do |cm| + # cm.update_column(:viewed, true) + # end + # over @page = params[:page] ? params[:page].to_i + 1 : 2 @container_type = 0 if params[:sort]