|
|
|
@@ -4,7 +4,7 @@ class Api::V1::Issues::Journals::UpdateService < ApplicationService |
|
|
|
include Api::V1::Issues::Concerns::Loadable |
|
|
|
|
|
|
|
attr_reader :issue, :journal, :current_user, :notes, :attachment_ids, :receivers_login |
|
|
|
attr_accessor :updated_journal |
|
|
|
attr_accessor :updated_journal, :atme_receivers |
|
|
|
|
|
|
|
validates :notes, :issue, :journal, :current_user, presence: true |
|
|
|
|
|
|
|
@@ -36,7 +36,7 @@ class Api::V1::Issues::Journals::UpdateService < ApplicationService |
|
|
|
@updated_journal.save! |
|
|
|
|
|
|
|
# @信息发送 |
|
|
|
AtmeService.call(current_user, @atme_receivers, @issue) unless receivers_login.blank? |
|
|
|
AtmeService.call(current_user, @atme_receivers, @created_journal) unless receivers_login.blank? |
|
|
|
|
|
|
|
unlock("Api::V1::Issues::Journals::UpdateService:#{@issue.id}:#{@journal.id}") |
|
|
|
|
|
|
|
@@ -48,6 +48,7 @@ class Api::V1::Issues::Journals::UpdateService < ApplicationService |
|
|
|
|
|
|
|
def build_atme_participants |
|
|
|
@atme_receivers.each do |receiver| |
|
|
|
next if @issue.issue_participants.exists?(participant_type: "atme", participant_id: receiver.id) |
|
|
|
@issue.issue_participants.new({participant_type: "atme", participant_id: receiver.id}) |
|
|
|
end |
|
|
|
end |
|
|
|
|