待审判用户,管理员批准时,其实管理员依旧还显示的问题

This commit is contained in:
daiao 2016-12-21 14:56:49 +08:00
parent 63bad2383b
commit 2f86fa5c5f
1 changed files with 2 additions and 2 deletions

View File

@ -1873,7 +1873,7 @@ class UsersController < ApplicationController
@applied_message_alls << mess @applied_message_alls << mess
end end
elsif (message_all.message_type == "AppliedMessage" ) elsif (message_all.message_type == "AppliedMessage" )
if (mess.applied_type == "StudentWorksScoresAppeal" && mess.status == 0) || (mess.applied_type == "AppliedProject" && mess.status == 1) || ( mess.applied_type == "ApplyAddSchools" && ApplyAddSchools.where(:school_id => mess.applied_id, :status => 0).count != 0 ) if (mess.applied_type == "StudentWorksScoresAppeal" && mess.status == 0) || (mess.applied_type == "AppliedProject" && mess.status == 1 && AppliedMessage.where("applied_id = #{mess.applied_id} and status != 1").count == 0) || ( mess.applied_type == "ApplyAddSchools" && ApplyAddSchools.where(:school_id => mess.applied_id, :status => 0).count != 0 )
@applied_message_alls << mess @applied_message_alls << mess
end end
elsif message_all.message_type == "CourseMessage" elsif message_all.message_type == "CourseMessage"
@ -2084,7 +2084,7 @@ class UsersController < ApplicationController
@message_alls << mess @message_alls << mess
end end
elsif (message_all.message_type == "AppliedMessage" ) elsif (message_all.message_type == "AppliedMessage" )
if (mess.applied_type == "StudentWorksScoresAppeal" && mess.status == 0) || (mess.applied_type == "AppliedProject" && mess.status == 1) || ( mess.applied_type == "ApplyAddSchools" && ApplyAddSchools.where(:school_id => mess.applied_id, :status => 0).count != 0 ) if (mess.applied_type == "StudentWorksScoresAppeal" && mess.status == 0) || (mess.applied_type == "AppliedProject" && mess.status == 1 && AppliedMessage.where("applied_id = #{mess.applied_id} and status != 1").count == 0) || ( mess.applied_type == "ApplyAddSchools" && ApplyAddSchools.where(:school_id => mess.applied_id, :status => 0).count != 0 )
@message_alls << mess @message_alls << mess
end end
elsif message_all.message_type == "CourseMessage" elsif message_all.message_type == "CourseMessage"