留言添加消息提示

This commit is contained in:
huang 2015-08-10 16:12:13 +08:00
parent bc6b6b0536
commit 82747a7690
2 changed files with 8 additions and 5 deletions

View File

@ -262,9 +262,11 @@ class UsersController < ApplicationController
# modified by fq
def user_newfeedback
jours = @user.journals_for_messages.where('m_parent_id IS NULL').order('created_on DESC')
jours.update_all(:is_readed => true, :status => false)
jours.each do |journal|
fetch_user_leaveWord_reply(journal).update_all(:is_readed => true, :status => false)
if User.current == @user
jours.update_all(:is_readed => true, :status => false)
jours.each do |journal|
fetch_user_leaveWord_reply(journal).update_all(:is_readed => true, :status => false)
end
end
@jour = paginateHelper jours,10
@state = false

View File

@ -292,8 +292,9 @@ class User < Principal
end
## end
# 查询用户未读过的记录
def count_new_jour
count = self.new_jours.count
count = self.journals_for_messages.where("status=?", 1).count
end
#added by nie