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