|
|
@ -117,6 +117,15 @@ class JournalsForMessage < ActiveRecord::Base
|
|
|
|
update_all("m_reply_count = #{count.to_i}", ["id = ?", journals_for_messages.m_parent_id])
|
|
|
|
update_all("m_reply_count = #{count.to_i}", ["id = ?", journals_for_messages.m_parent_id])
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#如果是在项目中留言则返回该项目否则返回nil - zjc
|
|
|
|
|
|
|
|
def project
|
|
|
|
|
|
|
|
if self.jour_type == 'Project'
|
|
|
|
|
|
|
|
Project.find(self.jour_id)
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
nil
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
# 更新用户分数 -by zjc
|
|
|
|
# 更新用户分数 -by zjc
|
|
|
|
def be_user_score
|
|
|
|
def be_user_score
|
|
|
|
#新建了留言回复
|
|
|
|
#新建了留言回复
|
|
|
|