From ca51336f247021aa79b8863522e15e8dee957e19 Mon Sep 17 00:00:00 2001
From: 李金换 <lijinhuan@prec-tech.com>
Date: 星期一, 21 三月 2022 10:19:49 +0800
Subject: [PATCH] 盘点Copy邮件标头修改
---
force-app/main/default/classes/PIHelper.cls | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/force-app/main/default/classes/PIHelper.cls b/force-app/main/default/classes/PIHelper.cls
index a1217ab..768cb35 100644
--- a/force-app/main/default/classes/PIHelper.cls
+++ b/force-app/main/default/classes/PIHelper.cls
@@ -8,6 +8,7 @@
*
* */
global without sharing class PIHelper {
+ public static Set<String> displayByOrderNumberObject = new set<String>{'Report__c'};
public static String getObjectKeyPrefix(String objName){
try{
schema.sObjectType sObjType = Schema.getGlobalDescribe().get(objName);
@@ -119,7 +120,7 @@
System.debug('config = ' + config);
//鑾峰彇appid鍜宎ppsecret
- AWS_Integration_Info__mdt awsConfiguration = [SELECT App_Id__c,Token_URL__c,App_Secret__c,Host_URL__c FROM AWS_Integration_Info__mdt WHERE DeveloperName = 'AWS_Default_Configuration'];
+ AWS_Integration_Info__mdt awsConfiguration = [SELECT App_Id__c,Max_Query_Number__c,Token_URL__c,App_Secret__c,Host_URL__c FROM AWS_Integration_Info__mdt WHERE DeveloperName = 'AWS_Default_Configuration'];
if (awsConfiguration == null) {
System.debug('AWS_Integration_Info__mdt娌¢厤缃�');
return null;
@@ -157,6 +158,9 @@
//鑾峰彇鏁忔劅瀛楁
piIntegration.PIDetails = [select id,PI_Policy_Configuration__r.Full_New_URL__c, Enable_Encrypt__c, SF_Field_API_Name__c,SF_Field_Encrypted_API__c, AWS_Field_API__c,AWS_Encrypted_Field_API__c,Field_Type__c from PI_Field_Policy_Detail__c where PI_Policy_Configuration_Name__c =:sobjectType and Enable_Encrypt__c=true];
+ if(displayByOrderNumberObject.contains(sobjectType)){
+ piIntegration.PIDetails = [select id,PI_Policy_Configuration__r.Full_New_URL__c, Enable_Encrypt__c, SF_Field_API_Name__c,SF_Field_Encrypted_API__c, AWS_Field_API__c,AWS_Encrypted_Field_API__c,Field_Type__c from PI_Field_Policy_Detail__c where PI_Policy_Configuration_Name__c =:sobjectType and Enable_Encrypt__c=true order by Order_Number__c];
+ }
List<String> vLookUpFields = new List<String>();
List<String> PIFields = new List<String>();
for (PI_Field_Policy_Detail__c PIDetail : piIntegration.PIDetails) {
@@ -170,6 +174,7 @@
System.debug('PIFields = ' + PIFields.toString());
//濉厖鏁版嵁
+ piIntegration.maxQueryNumber = Integer.valueof(awsConfiguration.Max_Query_Number__c);
piIntegration.newUrl = config.Full_New_URL__c;
piIntegration.updateUrl = config.Full_Update_URL__c;
piIntegration.queryUrl = config.Full_Read_URL__c;
@@ -189,6 +194,7 @@
return piIntegration;
}
global class PIIntegration{
+ public Integer maxQueryNumber{set;get;}
public String sobjectPrefix{set;get;}
public String searchUrl{set;get;}
public String newUrl{set;get;}
--
Gitblit v1.9.1