上线暂时还原代码

This commit is contained in:
huang 2016-05-23 16:34:31 +08:00
parent e62a4cc646
commit b1c70db28a
1 changed files with 4 additions and 4 deletions

View File

@ -169,7 +169,7 @@ class News < ActiveRecord::Base
if self.course
self.course.members.each do |m|
if m.user_id != self.author_id
self.delay.send_message(m.user_id, self.course_id)
# self.delay.send_message(m.user_id, self.course_id)
count = ShieldWechatMessage.where("container_type='User' and container_id=#{m.user_id} and shield_type='Course' and shield_id=#{self.course_id}").count
if count == 0
ws = WechatService.new
@ -189,9 +189,9 @@ class News < ActiveRecord::Base
end
end
def send_message user_id, course_id
self.course_messages << CourseMessage.new(:user_id => user_id, :course_id => course_id, :viewed => false)
end
# def send_message user_id, course_id
# self.course_messages << CourseMessage.new(:user_id => user_id, :course_id => course_id, :viewed => false)
# end
# Time 2015-03-31 13:50:54
# Author lizanle