From 02ddc35714cbd1688b7cb057f770f1410de79dab Mon Sep 17 00:00:00 2001
From: buli <137736985@qq.com>
Date: 星期五, 11 三月 2022 12:19:33 +0800
Subject: [PATCH] PIPL Updated Code 20220311
---
force-app/main/default/classes/NFM623Rest.cls | 49 +++++++++++++++++++++++++++++++++++++++++++------
1 files changed, 43 insertions(+), 6 deletions(-)
diff --git a/force-app/main/default/classes/NFM623Rest.cls b/force-app/main/default/classes/NFM623Rest.cls
index 5f627ff..09e050f 100644
--- a/force-app/main/default/classes/NFM623Rest.cls
+++ b/force-app/main/default/classes/NFM623Rest.cls
@@ -9,6 +9,10 @@
*************************************************************************/
@RestResource(urlMapping = '/NFM623/*')
global with sharing class NFM623Rest {
+ //add to AWS 鍥炲 start sushanhu 20220225
+ static Boolean SFStatus=true;
+ static String SFMessage='';
+ //add to AWS 鍥炲 end sushanhu 20220225
//鏂板NFM623Rest 瀛︿細路娲诲姩鍙傚姞浜哄憳鎺ユ敹鏁版嵁鎺ュ彛 绮剧悽鎶�鏈� start
global class GeDatas {
@@ -19,14 +23,14 @@
global class GeData {
public String Num; // 娲诲姩缂栫爜
public String Name; // 娲诲姩鍚嶇О
- public ViewContactIdS[] ViewContactIdS;
+ public ViewContactIdS[] ViewContactIdS; //鏇挎崲涓篴ws瀛樺偍鍑嵁ID 20220225 sushanhu
public LabelTypeS[] LabelTypeS;
}
global class ViewContactIdS {
public String ViewContactId; // 鐩存挱瑙傜湅缁熶竴鐢ㄦ埛ID
}
-
+
global class LabelTypeS {
public String LabelType; // 鏍囩鍒嗙被
public String Label; // 鏍囩鍐呭
@@ -34,7 +38,7 @@
@HttpPost
global static void execute() {
-
+
// 鍙栧緱鎺ュ彛浼犺緭鍐呭
String strData = RestContext.request.requestBody.toString();
GeDatas ges = (GeDatas) JSON.deserializeStrict(strData, GeDatas.class);
@@ -57,8 +61,16 @@
RestResponse res = RestContext.response;
res.addHeader('Content-Type', 'application/json');
res.statusCode = 200;
- String jsonResponse = '{"status": "Success", "Message":""}';
+ // String jsonResponse = '{"status": "Success", "Message":""}';
+ // res.responseBody = blob.valueOf(jsonResponse);
+ //updata response toAWS 20220225 sushanhu start
+ NFMUtil.NFMResponse result = NFMUtil.getNFMResponse();
+ result.SFStatus=SFStatus;
+ result.SFMessage=SFMessage;
+ String jsonResponse =JSON.serialize(result);
+ system.debug('result---'+jsonResponse);
res.responseBody = blob.valueOf(jsonResponse);
+ //updata response toAWS 20220225 sushanhu end
return;
}
@@ -119,7 +131,7 @@
//浣跨敤缁熶竴鐢ㄦ埛ID鑾峰彇瀹㈡埛浜哄憳ID銆佸鎴蜂汉鍛樺鍚嶃�佸尰闄㈢瀹ゅ瓨鍏ap
Map<String, Contact> contactMap = new Map<String, Contact>();
List<String> conIDList = new List<String>();
- if (conIDMapNew.size() > 0) {
+ if (conIDMapNew.size() > 0) {
List<Contact> contactList = [select Id,Name,UnifiedI_Contact_ID__c,
AccountId,Account.Name
from Contact where UnifiedI_Contact_ID__c in :conIDListNew];
@@ -130,6 +142,18 @@
conIDList.add(conInfo.Id);
}
}
+ //update to 閫氳繃aws瀛樺偍鐨剈nified鏌ヨ start 20220225
+ // List<Contact> contactList = [select Id,Name,AWS_UnifiedI_Contact_ID__c,
+ // AccountId,Account.Name
+ // from Contact where AWS_UnifiedI_Contact_ID__c in :conIDListNew];
+ // if (contactList.size() > 0) {
+ // //瀹㈡埛浜哄憳ID鑾峰彇鎴愬姛
+ // for (Contact conInfo : contactList) {
+ // contactMap.put(conInfo.AWS_UnifiedI_Contact_ID__c, conInfo);
+ // conIDList.add(conInfo.Id);
+ // }
+ // }
+ //update to 閫氳繃aws瀛樺偍鐨剈nified鏌ヨ 20220225 end
}
//浣跨敤甯傚満娲诲姩缂栫爜鑾峰彇甯傚満娲诲姩ID鍜屾椿鍔ㄥ悕绉板瓨鍏ap
List<String> camIDList = new List<String>();
@@ -155,7 +179,20 @@
camViewContactMap.put(cm.ViewContactId__c, cm.Campaign__r.Num__c);
}
}
-
+
+ //update to 鑾峰彇aws 缁熶竴鍑嵁鍏宠仈 sushanhu 20220225 satrt
+ // List<CampaignMember__c> camMemberList = [select Id,Contact_ID__c,AWS_ViewContact_Id__c,
+ // Campaign__c,Campaign__r.Num__c
+ // from CampaignMember__c where Campaign__c in : camIDList];
+ // Map<String, String> camContactMap = new Map<String, String>();
+ // Map<String, String> camViewContactMap = new Map<String, String>();
+ // if (camMemberList.size() > 0 ) {
+ // for (CampaignMember__c cm : camMemberList) {
+ // camContactMap.put(cm.Contact_ID__c, cm.Campaign__r.Num__c);
+ // camViewContactMap.put(cm.AWS_ViewContact_Id__c, cm.Campaign__r.Num__c);
+ // }
+ // }
+ //update to 鑾峰彇aws 缁熶竴鍑嵁鍏宠仈 sushanhu 20220225 end
//灏嗗師鏈夋椿鍔ㄦ爣绛惧璞′腑甯傚満娲诲姩ID鍜屾爣绛炬椿鍔ㄥ悕绉板瓨鍏ap涓�
List<CampaignLable__c> camLabInfoList = [select id,name,Campaign__c,Lable__c,LableType__c from CampaignLable__c where Campaign__c in : camIDList];
Map<String, String> camLabInfoMap = new Map<String, String>();
--
Gitblit v1.9.1