微信回复加上root_id

This commit is contained in:
yuanke 2016-10-13 08:47:55 +08:00
parent e52026142a
commit a7aa0b3a84
1 changed files with 6 additions and 2 deletions

View File

@ -112,7 +112,7 @@ module Mobile
# end
if reply_type == nil || reply_type == 0
homework_common = HomeworkCommon.find(params[:id])
feedback = HomeworkCommon.add_homework_jour(current_user, params[:content], params[:id])
feedback = HomeworkCommon.add_homework_jour(current_user, params[:content], params[:id], params[:id])
if (feedback.errors.empty?)
homework_common.update_column(:updated_at, Time.now)
result = 2
@ -124,7 +124,7 @@ module Mobile
homework_common = HomeworkCommon.find reply.jour_id
options = {:notes => params[:content], :reply_id => reply.user_id,:user_id => current_user.id,:m_parent_id => params[:id].to_i,:m_reply_id => params[:id].to_i}
feedback = HomeworkCommon.add_homework_jour(current_user, params[:content], reply.jour_id, options)
feedback = HomeworkCommon.add_homework_jour(current_user, params[:content], reply.jour_id, reply.jour_id, options)
if (feedback.errors.empty?)
homework_common.update_column(:updated_at, Time.now)
result = 2
@ -189,6 +189,7 @@ module Mobile
reply.content = params[:content]
reply.parent_id = params[:id]
reply.subject = "RE: #{topic.subject}"
reply.root_id = topic.id
if message.children << reply
result = 2
update_id = topic.id
@ -224,6 +225,7 @@ module Mobile
:m_parent_id => parent_id,
:m_reply_id => reply_id,
:reply_id => reply_user_id,
:root_id => jour.id,
:notes => content,
:is_readed => false}
jfm = jour.user.add_jour(nil, nil, nil, options)
@ -278,6 +280,7 @@ module Mobile
blogComment.blog = blog.blog
blogComment.content = params[:content]
blogComment.title = "RE: #{blog.title}"
blogComment.root_id = blog.id
if blog.children << blogComment
result = 2
update_id = blog.id
@ -293,6 +296,7 @@ module Mobile
parent = BlogComment.find params[:id]
blogComment.parent_id = params[:id] #被回复的回复
blogComment.reply_id = parent.author.id #被回复者id
blogComment.root_id = blog.id
if parent.children << blogComment
result = 2