From 1727a4f4d02e429475608e60f142a63bc24127bc Mon Sep 17 00:00:00 2001
From: 19626 <1962676589@qq.com>
Date: 星期一, 23 十月 2023 10:07:34 +0800
Subject: [PATCH] 近期修改

---
 force-app/main/default/classes/BidAnnounceIframeController.cls |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/force-app/main/default/classes/BidAnnounceIframeController.cls b/force-app/main/default/classes/BidAnnounceIframeController.cls
index 6f2b673..e4e4a1c 100644
--- a/force-app/main/default/classes/BidAnnounceIframeController.cls
+++ b/force-app/main/default/classes/BidAnnounceIframeController.cls
@@ -20,10 +20,10 @@
         if (docList.size() > 0) {
             doc = docList[0];
         }
-        ContentVersion version = [select Id from ContentVersion where ContentDocumentId =: doc.Id];
         if (bid.Web_URL__c != null) {
             // 涓爣閫氱煡涔RL鏇存柊鏃堕棿銆�銇ㄣ��鏈�鏂癆ttachment銇檪闁撱仺姣旇純銆佹柊銇椼亜銈傘伄銈掗仼鐢�
             if (doc != null) {
+                ContentVersion version = [select Id from ContentVersion where ContentDocumentId =: doc.Id];
                 if (bid.Web_URL_ModifiedDate__c < doc.ContentModifiedDate) {
                     iframe = '/sfc/servlet.shepherd/version/renditionDownload?rendition=THUMB720BY480&versionId='+ version.Id;
                 } else {
@@ -37,6 +37,7 @@
         } else {
             // Attachment銈掗仼鐢�
             if (doc != null) {
+                ContentVersion version = [select Id from ContentVersion where ContentDocumentId =: doc.Id];
                 iframe = '/sfc/servlet.shepherd/version/renditionDownload?rendition=THUMB720BY480&versionId='+ version.Id;
             }
         }

--
Gitblit v1.9.1