作业和留言回复的模板消息
This commit is contained in:
parent
3f365e75b5
commit
007fee95bd
|
@ -257,7 +257,7 @@ class JournalsForMessage < ActiveRecord::Base
|
|||
end
|
||||
end
|
||||
if self.jour_type == 'HomeworkCommon'
|
||||
journal_wechat_message '您的作业有新回复了'
|
||||
journal_wechat_message '您的作业有新回复了',self.jour.user_id
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -270,7 +270,7 @@ class JournalsForMessage < ActiveRecord::Base
|
|||
if self.reply_id == 0
|
||||
if self.user_id != self.jour_id # 过滤自己给自己的留言消息
|
||||
receivers << self.jour
|
||||
journal_wechat_message "您有新留言了"
|
||||
journal_wechat_message "您有新留言了",self.jour_id
|
||||
end
|
||||
else # 留言回复
|
||||
reply_to = User.find(self.reply_id)
|
||||
|
@ -280,7 +280,7 @@ class JournalsForMessage < ActiveRecord::Base
|
|||
if self.user_id != self.parent.jour_id && self.reply_id != self.parent.jour_id # 给东家发信息,如果回复的对象是东家则不发
|
||||
receivers << self.parent.jour
|
||||
end
|
||||
journal_wechat_message "您的留言有新回复了"
|
||||
journal_wechat_message "您的留言有新回复了",self.reply_id
|
||||
end
|
||||
receivers.each do |r|
|
||||
self.user_feedback_messages << UserFeedbackMessage.new(:user_id => r.id, :journals_for_message_id => self.id, :journals_for_message_type => "Principal", :viewed => false)
|
||||
|
@ -308,8 +308,8 @@ class JournalsForMessage < ActiveRecord::Base
|
|||
end
|
||||
|
||||
#微信模板消息
|
||||
def journal_wechat_message type
|
||||
uw = UserWechat.where(user_id: self.reply_id).first
|
||||
def journal_wechat_message type, user_id
|
||||
uw = UserWechat.where(user_id: user_id).first
|
||||
#unless uw.nil? && self.reply_id != User.current.id
|
||||
unless uw.nil?
|
||||
data = {
|
||||
|
|
|
@ -10,7 +10,7 @@ app.factory('auth', function($http,$routeParams, $cookies, $q){
|
|||
var _openid = '';
|
||||
|
||||
if(debug===true){
|
||||
_openid = "1";
|
||||
_openid = "6";
|
||||
}
|
||||
|
||||
var getOpenId = function() {
|
||||
|
|
Loading…
Reference in New Issue