From fd9df05c48c09b4d7f39a3b401882bda226dedea Mon Sep 17 00:00:00 2001
From: 19626 <1962676589@qq.com>
Date: 星期二, 31 十月 2023 20:38:18 +0800
Subject: [PATCH] 近期修改
---
force-app/main/default/classes/BidAnnounceIframeController.cls | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/force-app/main/default/classes/BidAnnounceIframeController.cls b/force-app/main/default/classes/BidAnnounceIframeController.cls
index 68b19cb..5e1c479 100644
--- a/force-app/main/default/classes/BidAnnounceIframeController.cls
+++ b/force-app/main/default/classes/BidAnnounceIframeController.cls
@@ -7,6 +7,7 @@
}
public void init() {
+ // 20231103 Lightning鏂囦欢淇敼 Start
Bid_Announcement__c bid = [select Id, Web_URL__c, Web_URL_ModifiedDate__c from Bid_Announcement__c where Id = :recordId];
// List<Attachment> attList = [select Id, LastModifiedDate from Attachment where ParentId = :recordId order by LastModifiedDate desc limit 1];
List<ContentDocumentLink> links = [select ContentDocumentId from ContentDocumentLink where LinkedEntityId =: recordId];
@@ -20,12 +21,12 @@
if (docList.size() > 0) {
doc = docList[0];
}
-
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 = '/lightning/r/ContentDocument/' + doc.Id + '/view';
+ iframe = '/sfc/servlet.shepherd/version/renditionDownload?rendition=THUMB720BY480&versionId='+ version.Id;
} else {
iframe = bid.Web_URL__c;
}
@@ -37,8 +38,10 @@
} else {
// Attachment銈掗仼鐢�
if (doc != null) {
- iframe = '/lightning/r/ContentDocument/' + doc.Id + '/view';
+ ContentVersion version = [select Id from ContentVersion where ContentDocumentId =: doc.Id];
+ iframe = '/sfc/servlet.shepherd/version/renditionDownload?rendition=THUMB720BY480&versionId='+ version.Id;
}
}
+ // 20231103 Lightning鏂囦欢淇敼 End
}
}
\ No newline at end of file
--
Gitblit v1.9.1