微信回复加上root_id
This commit is contained in:
parent
e52026142a
commit
a7aa0b3a84
|
@ -112,7 +112,7 @@ module Mobile
|
||||||
# end
|
# end
|
||||||
if reply_type == nil || reply_type == 0
|
if reply_type == nil || reply_type == 0
|
||||||
homework_common = HomeworkCommon.find(params[:id])
|
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?)
|
if (feedback.errors.empty?)
|
||||||
homework_common.update_column(:updated_at, Time.now)
|
homework_common.update_column(:updated_at, Time.now)
|
||||||
result = 2
|
result = 2
|
||||||
|
@ -124,7 +124,7 @@ module Mobile
|
||||||
homework_common = HomeworkCommon.find reply.jour_id
|
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}
|
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?)
|
if (feedback.errors.empty?)
|
||||||
homework_common.update_column(:updated_at, Time.now)
|
homework_common.update_column(:updated_at, Time.now)
|
||||||
result = 2
|
result = 2
|
||||||
|
@ -189,6 +189,7 @@ module Mobile
|
||||||
reply.content = params[:content]
|
reply.content = params[:content]
|
||||||
reply.parent_id = params[:id]
|
reply.parent_id = params[:id]
|
||||||
reply.subject = "RE: #{topic.subject}"
|
reply.subject = "RE: #{topic.subject}"
|
||||||
|
reply.root_id = topic.id
|
||||||
if message.children << reply
|
if message.children << reply
|
||||||
result = 2
|
result = 2
|
||||||
update_id = topic.id
|
update_id = topic.id
|
||||||
|
@ -224,6 +225,7 @@ module Mobile
|
||||||
:m_parent_id => parent_id,
|
:m_parent_id => parent_id,
|
||||||
:m_reply_id => reply_id,
|
:m_reply_id => reply_id,
|
||||||
:reply_id => reply_user_id,
|
:reply_id => reply_user_id,
|
||||||
|
:root_id => jour.id,
|
||||||
:notes => content,
|
:notes => content,
|
||||||
:is_readed => false}
|
:is_readed => false}
|
||||||
jfm = jour.user.add_jour(nil, nil, nil, options)
|
jfm = jour.user.add_jour(nil, nil, nil, options)
|
||||||
|
@ -278,6 +280,7 @@ module Mobile
|
||||||
blogComment.blog = blog.blog
|
blogComment.blog = blog.blog
|
||||||
blogComment.content = params[:content]
|
blogComment.content = params[:content]
|
||||||
blogComment.title = "RE: #{blog.title}"
|
blogComment.title = "RE: #{blog.title}"
|
||||||
|
blogComment.root_id = blog.id
|
||||||
if blog.children << blogComment
|
if blog.children << blogComment
|
||||||
result = 2
|
result = 2
|
||||||
update_id = blog.id
|
update_id = blog.id
|
||||||
|
@ -293,6 +296,7 @@ module Mobile
|
||||||
parent = BlogComment.find params[:id]
|
parent = BlogComment.find params[:id]
|
||||||
blogComment.parent_id = params[:id] #被回复的回复
|
blogComment.parent_id = params[:id] #被回复的回复
|
||||||
blogComment.reply_id = parent.author.id #被回复者id
|
blogComment.reply_id = parent.author.id #被回复者id
|
||||||
|
blogComment.root_id = blog.id
|
||||||
|
|
||||||
if parent.children << blogComment
|
if parent.children << blogComment
|
||||||
result = 2
|
result = 2
|
||||||
|
|
Loading…
Reference in New Issue