From 08e9b8d56333314f3dbb417266aa365bcfbde72a Mon Sep 17 00:00:00 2001 From: yuanke <249218296@qq.com> Date: Thu, 3 Nov 2016 11:11:52 +0800 Subject: [PATCH] . --- app/models/user.rb | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/app/models/user.rb b/app/models/user.rb index d65b661d8..5e37e84fd 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -1219,6 +1219,9 @@ class User < Principal def add_new_jour tStarttime = Time.now if Setting.find_by_name("hidden_non_project") && Setting.find_by_name("hidden_non_project").value != "0" + tEndtime = Time.now + tUsedtime = (tEndtime.to_i-tStarttime.to_i)*1000+(tEndtime.usec - tStarttime.usec)/1000 + Rails.logger.info "add_new_jour_1 wait time = #{tUsedtime} ms" 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 @@ -1227,14 +1230,20 @@ class User < Principal lead_message3 = Message.find(19504) notes3 = lead_message3.content #user_id 默认为课程使者创建 + tEndtime = Time.now + tUsedtime = (tEndtime.to_i-tStarttime.to_i)*1000+(tEndtime.usec - tStarttime.usec)/1000 + Rails.logger.info "add_new_jour_2 wait time = #{tUsedtime} ms" 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) + tEndtime = Time.now + tUsedtime = (tEndtime.to_i-tStarttime.to_i)*1000+(tEndtime.usec - tStarttime.usec)/1000 + Rails.logger.info "add_new_jour_3 wait time = #{tUsedtime} ms" end end tEndtime = Time.now tUsedtime = (tEndtime.to_i-tStarttime.to_i)*1000+(tEndtime.usec - tStarttime.usec)/1000 - Rails.logger.info "add_new_jour wait time = #{tUsedtime} ms" + Rails.logger.info "add_new_jour_4 wait time = #{tUsedtime} ms" end # 更新邮箱的同事,更新invite_lists表中的邮箱信息