新手注册三条留言
This commit is contained in:
parent
11e0101f56
commit
05fe987a8b
|
@ -1148,17 +1148,17 @@ class User < Principal
|
|||
|
||||
#为新注册用户发送留言
|
||||
def add_new_jour
|
||||
if Message.where("id=19278").any? and Message.where("id=19291").any? and Message.where("id=19292").any?
|
||||
lead_message1 = Message.find(19278)
|
||||
if Message.where("id=19504").any? and Message.where("id=19291").any? and Message.where("id=19292").any?
|
||||
lead_message1 = Message.find(19292)
|
||||
notes1 = lead_message1.content
|
||||
# lead_message2 = Message.find(19292)
|
||||
# notes2 = lead_message2.content
|
||||
# lead_message3 = Message.find(19291)
|
||||
# notes3 = lead_message3.content
|
||||
# # user_id 默认为课程使者创建
|
||||
lead_message2 = Message.find(19291)
|
||||
notes2 = lead_message2.content
|
||||
lead_message3 = Message.find(19504)
|
||||
notes3 = lead_message3.content
|
||||
#user_id 默认为课程使者创建
|
||||
self.journals_for_messages << JournalsForMessage.new(:user_id => 1, :notes => notes1, :reply_id => 0, :status => true, :is_readed => false, :private => 0)
|
||||
# self.journals_for_messages << JournalsForMessage.new(:user_id => 1, :notes => notes2, :reply_id => 0, :status => true, :is_readed => false, :private => 0)
|
||||
# self.journals_for_messages << JournalsForMessage.new(:user_id => 1, :notes => notes3, :reply_id => 0, :status => true, :is_readed => false, :private => 0)
|
||||
self.journals_for_messages << JournalsForMessage.new(:user_id => 1, :notes => notes2, :reply_id => 0, :status => true, :is_readed => false, :private => 0)
|
||||
self.journals_for_messages << JournalsForMessage.new(:user_id => 1, :notes => notes3, :reply_id => 0, :status => true, :is_readed => false, :private => 0)
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue