留言添加消息提示
This commit is contained in:
parent
bc6b6b0536
commit
82747a7690
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue