From d8dc84a3d56df839895f1c417a4d9cbee763d262 Mon Sep 17 00:00:00 2001
From: 高章伟 <gaozhangwei@prec-tech.com>
Date: 星期五, 03 三月 2023 14:50:59 +0800
Subject: [PATCH] gzw 测试环境代码更新
---
force-app/main/default/classes/AWSServiceTool.cls | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/force-app/main/default/classes/AWSServiceTool.cls b/force-app/main/default/classes/AWSServiceTool.cls
index df4e19e..b85395e 100644
--- a/force-app/main/default/classes/AWSServiceTool.cls
+++ b/force-app/main/default/classes/AWSServiceTool.cls
@@ -10,7 +10,7 @@
public without sharing class AWSServiceTool {
public static List<Contact> getNoPIContact(String searchContactName,String accountId){
if(searchContactName!='' || accountId!=''){
- String noPISQL = 'select Id,Name,Email,Phone,Account.Name from Contact where Account_Record_Type_DeveloperName__c in('+'\'Agency\''+','+'\'Office\''+',\'AgencyContact\''+')';
+ String noPISQL = 'select Id,Name,Email,Phone,Account.Name,MobilePhone from Contact where Account_Record_Type_DeveloperName__c in('+'\'Agency\''+','+'\'Office\''+',\'AgencyContact\''+')';
if(String.isNotEmpty(accountId)){
noPISQL += ' and AccountId=\''+accountId+'\'';
}
@@ -23,6 +23,7 @@
}
return new List<Contact>();
}
+
public static String getAWSToken(){
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'];
if (awsConfiguration == null) {
@@ -36,6 +37,9 @@
String url = awsConfiguration.Token_URL__c;
request.setEndpoint(url);
request.setMethod('GET');
+ if(Test.isRunningTest()){
+ return 'UTToken';
+ }
HttpResponse response = http.send(request);
Map<String, Object> results = (Map<String, Object>) JSON.deserializeUntyped(response.getBody());
String token = (String)results.get('object');
--
Gitblit v1.9.1