From 5114c12c17cb0ea55ddb8fe4f36e437ce1623d90 Mon Sep 17 00:00:00 2001 From: huang Date: Fri, 20 May 2016 15:34:35 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B3=A8=E9=87=8A=E6=8E=89=E4=B8=BA=E5=AE=8C?= =?UTF-8?q?=E6=88=90=E7=9A=84=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/files_controller.rb | 7 +++++++ 1 file changed, 7 insertions(+) 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]