@ -381,6 +381,11 @@ class ApplicationController < ActionController::Base
ifallowed
true
else
ifparams[:action]=='show'
#更新申请结果反馈消息的状态
messages=CourseMessage.where("course_message_type =? and course_id =? and user_id =? and viewed =?",'CourseRequestDealResult',@course.id,User.current.id,false)
@ -617,6 +617,10 @@ class CoursesController < ApplicationController
create_course_messages=@course.course_messages.where("user_id =? and course_message_type =? and course_id =? and viewed =?",User.current.id,'Course',@course.id,0)
create_course_messages.update_all(:viewed=>true)
#更新申请结果反馈消息的状态
course_request_messages=CourseMessage.where("user_id =? and course_id =? and course_message_type =? and viewed =?",User.current.id,@course.id,'CourseRequestDealResult',false)