把组织未读消息加入铃铛消息提醒中

This commit is contained in:
ouyangxuhua 2016-01-29 17:49:20 +08:00
parent 68bd109831
commit 125f00689b
1 changed files with 2 additions and 1 deletions

View File

@ -345,7 +345,8 @@ class User < Principal
user_memo_count = MemoMessage.where("user_id =? and viewed =? and created_at >?", User.current.id, 0, User.current.onclick_time.onclick_time).count
system_messages_count = SystemMessage.where("created_at >?", User.current.onclick_time.onclick_time).count
at_count = AtMessage.where("user_id =? and viewed =? and created_at >?", User.current.id, 0, User.current.onclick_time.onclick_time).count
messages_count = course_count + forge_count + user_feedback_count + user_memo_count + system_messages_count + at_count
org_count = OrgMessage.where("user_id=? and viewed =? and created_at >?", User.current.id,0, User.current.onclick_time.onclick_time).count
messages_count = course_count + forge_count + user_feedback_count + user_memo_count + system_messages_count + at_count + org_count
end
# 查询指派给我的缺陷记录