diff --git a/app/models/news.rb b/app/models/news.rb index 6aaee91ac..5e3726418 100644 --- a/app/models/news.rb +++ b/app/models/news.rb @@ -193,6 +193,7 @@ class News < ActiveRecord::Base end def news_wechat_message + logger.info 'start news_wechat_message!!!!!!!!' self.course.members.each do |m| if m.user_id != self.author_id #self.course_messages << CourseMessage.new(:user_id => m.user_id, :course_id => self.course_id, :viewed => false) @@ -200,6 +201,7 @@ class News < ActiveRecord::Base if count == 0 ws = WechatService.new content = self.title + logger.info 'send wechat message!!!!!!!' ws.class_notice m.user_id, "course_notice", self.id, "#{l(:label_new_notice_template)}", self.course.name, self.author.show_name, format_time(self.created_on), content, "点击查看通知详情" end end