fixed 附件uuid查询精准匹配
This commit is contained in:
parent
cc5a671458
commit
d69438454d
|
@ -89,8 +89,8 @@ class Journal < ApplicationRecord
|
|||
when 'issue'
|
||||
return "创建了<b>疑修</b>"
|
||||
when 'attachment'
|
||||
old_value = Attachment.where("id in (?) or uuid in (?)", detail.old_value.to_s.split(","), detail.old_value.to_s.split(",")).pluck(:filename).join("、")
|
||||
new_value = Attachment.where("id in (?) or uuid in (?)", detail.value.to_s.split(","), detail.value.to_s.split(",")).pluck(:filename).join("、")
|
||||
old_value = Attachment.where("BINARY id in (?) or uuid in (?)", detail.old_value.to_s.split(","), detail.old_value.to_s.split(",")).pluck(:filename).join("、")
|
||||
new_value = Attachment.where("BINARY id in (?) or uuid in (?)", detail.value.to_s.split(","), detail.value.to_s.split(",")).pluck(:filename).join("、")
|
||||
if old_value.nil? || old_value.blank?
|
||||
content += "添加了<b>#{new_value}</b>附件"
|
||||
else
|
||||
|
|
|
@ -9,7 +9,7 @@ module Api::V1::Issues::Concerns::Loadable
|
|||
end
|
||||
|
||||
def load_attachments(attachment_ids)
|
||||
@attachments = Attachment.where("id in (?) or uuid in (?)", attachment_ids, attachment_ids)
|
||||
@attachments = Attachment.where("BINARY id in (?) or uuid in (?)", attachment_ids, attachment_ids)
|
||||
end
|
||||
|
||||
def load_atme_receivers(receivers_login)
|
||||
|
|
Loading…
Reference in New Issue