dev_hjm
p31729568 6 years ago
parent f977591bb6
commit 1b81785495

@ -11,7 +11,7 @@ class ApplyTeacherRoleJoinCourseNotifyJob < ApplicationJob
belong_container_type tiding_type extra created_at updated_at]
same_attrs = {
trigger_user_id: user.id, container_id: course.id, container_type: 'JoinCourse',
trigger_user_id: user.id, container_id: course.id, container_type: 'JoinCourse', status: 0,
belong_container_id: course.id, belong_container_type: 'Course', tiding_type: 'Apply', extra: role
}
Tiding.bulk_insert(*attrs) do |worker|

@ -327,7 +327,7 @@ class Course < ApplicationRecord
#创建课程后,给该用户发送消息
def send_tiding
self.tidings << Tiding.new(user_id: tea_id, trigger_user_id: tea_id, belong_container_id: id,
self.tidings << Tiding.new(user_id: tea_id, trigger_user_id: 1, belong_container_id: id,
belong_container_type: 'Course', tiding_type: 'System')
end

Loading…
Cancel
Save