留言添加消息提示
This commit is contained in:
parent
bc6b6b0536
commit
82747a7690
|
@ -262,9 +262,11 @@ class UsersController < ApplicationController
|
||||||
# modified by fq
|
# modified by fq
|
||||||
def user_newfeedback
|
def user_newfeedback
|
||||||
jours = @user.journals_for_messages.where('m_parent_id IS NULL').order('created_on DESC')
|
jours = @user.journals_for_messages.where('m_parent_id IS NULL').order('created_on DESC')
|
||||||
jours.update_all(:is_readed => true, :status => false)
|
if User.current == @user
|
||||||
jours.each do |journal|
|
jours.update_all(:is_readed => true, :status => false)
|
||||||
fetch_user_leaveWord_reply(journal).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
|
end
|
||||||
@jour = paginateHelper jours,10
|
@jour = paginateHelper jours,10
|
||||||
@state = false
|
@state = false
|
||||||
|
|
|
@ -291,9 +291,10 @@ class User < Principal
|
||||||
name
|
name
|
||||||
end
|
end
|
||||||
## end
|
## end
|
||||||
|
|
||||||
|
# 查询用户未读过的记录
|
||||||
def count_new_jour
|
def count_new_jour
|
||||||
count = self.new_jours.count
|
count = self.journals_for_messages.where("status=?", 1).count
|
||||||
end
|
end
|
||||||
|
|
||||||
#added by nie
|
#added by nie
|
||||||
|
|
Loading…
Reference in New Issue