From 03523642de0c4f319d90d0aec8a756f9e80e6a7e Mon Sep 17 00:00:00 2001
From: Li Jun <buli@deloitte.com.cn>
Date: 星期四, 17 三月 2022 21:27:47 +0800
Subject: [PATCH] PIPLFunctionDeployV2

---
 force-app/main/default/classes/SearchContactController.cls |   14 +++++++++++++-
 1 files changed, 13 insertions(+), 1 deletions(-)

diff --git a/force-app/main/default/classes/SearchContactController.cls b/force-app/main/default/classes/SearchContactController.cls
index aa95550..f84e347 100644
--- a/force-app/main/default/classes/SearchContactController.cls
+++ b/force-app/main/default/classes/SearchContactController.cls
@@ -43,7 +43,7 @@
         }
         List<String> awsDataIds = (List<String>) JSON.deserialize(awsContactIds, List<String>.class);
         Map<String,Contact> awsIdToContactMapTemp = new Map<String,Contact>();
-        List<Contact> conListTemp = new List<Contact>([select Id,AWS_Data_Id__c from Contact where AWS_Data_Id__c in:awsDataIds]);
+        List<Contact> conListTemp = new List<Contact>([select Id,AWS_Data_Id__c,Account.Name from Contact where AWS_Data_Id__c in:awsDataIds]);
         for(Contact con:conListTemp){
             awsIdToContactMapTemp.put(con.AWS_Data_Id__c,con);
         }
@@ -54,6 +54,18 @@
         return resp;
     }
 
+    @RemoteAction
+    public static Response searchContactsNoPI(String contactName) {
+        Response resp = new Response();
+        resp.status = 'fail';
+        List<Contact> conListTemp = new List<Contact>([select Id,Name,Account.Name,Phone,Email from Contact where Name like :contactName]);
+        if(conListTemp.size() > 0){
+            resp.status = 'success';
+            resp.message = JSON.serialize(conListTemp);
+        }
+        return resp;
+    }
+
     public class Response{
         public String message{set;get;}
         public String status{set;get;}

--
Gitblit v1.9.1