diff --git a/app/models/journal.rb b/app/models/journal.rb
index 0fdca0f9d..57eca7035 100644
--- a/app/models/journal.rb
+++ b/app/models/journal.rb
@@ -89,8 +89,8 @@ class Journal < ApplicationRecord
when 'issue'
return "创建了疑修"
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 += "添加了#{new_value}附件"
else
diff --git a/app/services/api/v1/issues/concerns/loadable.rb b/app/services/api/v1/issues/concerns/loadable.rb
index 547ff50d7..c8f67f256 100644
--- a/app/services/api/v1/issues/concerns/loadable.rb
+++ b/app/services/api/v1/issues/concerns/loadable.rb
@@ -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)