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/ViewParticipantsController.cls |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/force-app/main/default/classes/ViewParticipantsController.cls b/force-app/main/default/classes/ViewParticipantsController.cls
index f88d12b..688a927 100644
--- a/force-app/main/default/classes/ViewParticipantsController.cls
+++ b/force-app/main/default/classes/ViewParticipantsController.cls
@@ -1,6 +1,14 @@
 global class ViewParticipantsController {
     public String staticResourceContact {get; set;}
+    public String viewContactId {get; set;}
     public ViewParticipantsController(ApexPages.StandardController controller) {
         staticResourceContact = JSON.serialize(PIHelper.getPIIntegrationInfo('Contact'));
+        SObject obj = controller.getRecord();
+        if (obj.id != null||Test.isRunningTest()) {
+            List<CampaignMember__c> lcm = [select ViewContactId__c from CampaignMember__c where id=:obj.id];
+            if (lcm.size() > 0) {
+                viewContactId = lcm[0].ViewContactId__c;
+            }
+        }
     }
 }
\ No newline at end of file

--
Gitblit v1.9.1