From d69438454d947bfc744d614a1870efda38b58b0c Mon Sep 17 00:00:00 2001 From: xxq250 Date: Thu, 22 Aug 2024 14:20:19 +0800 Subject: [PATCH] =?UTF-8?q?fixed=20=E9=99=84=E4=BB=B6uuid=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2=E7=B2=BE=E5=87=86=E5=8C=B9=E9=85=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/models/journal.rb | 4 ++-- app/services/api/v1/issues/concerns/loadable.rb | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) 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)