From 4bfe21c4b5ddc089ae5a95f4b10f6cff148b690d Mon Sep 17 00:00:00 2001
From: 高章伟 <gaozhangwei@prec-tech.com>
Date: 星期五, 18 三月 2022 18:27:34 +0800
Subject: [PATCH] NFM606fix

---
 force-app/main/default/classes/ContactTriggerHandler.cls |   19 ++++---------------
 1 files changed, 4 insertions(+), 15 deletions(-)

diff --git a/force-app/main/default/classes/ContactTriggerHandler.cls b/force-app/main/default/classes/ContactTriggerHandler.cls
index c7cf9af..81dd614 100644
--- a/force-app/main/default/classes/ContactTriggerHandler.cls
+++ b/force-app/main/default/classes/ContactTriggerHandler.cls
@@ -376,7 +376,7 @@
                     // 鍖婚櫌 瀹㈡埛浜哄憳 缁熶竴骞冲彴缂栫爜鏈夊�� 鍙戦�� PO
                     if ('01210000000QfWdAAK'.equals(local.RecordTypeId) && String.isNotBlank(local.UnifiedI_Contact_ID__c)) {
                         if (!NFM606_IdMap.containsKey(local.Id)) {
-                            if(UserInfo.getUserId().equals(System.Label.interfaceUserID)){
+                            if(UserInfo.getProfileId().equals(System.Label.ProfileId_SystemAdmin)){
                                 interfaceUserUpsertContact.add(local.Id);
                             } else {
                                 contactIdList.add(local.Id);
@@ -387,7 +387,7 @@
                     // 缁忛攢鍟� 瀹㈡埛浜哄憳 鎵嬫満鍙风爜鏈夊�� 鍙戦�� PO
                     if ('01210000000QfWiAAK'.equals(local.RecordTypeId) && String.isNotBlank(local.MobilePhone)) {
                         if (!NFM606_IdMap.containsKey(local.Id)) {
-                            if(UserInfo.getUserId().equals(System.Label.interfaceUserID)){
+                            if(UserInfo.getProfileId().equals(System.Label.ProfileId_SystemAdmin)){
                                 interfaceUserUpsertContact.add(local.Id);
                             } else {
                                 contactIdList.add(local.Id);
@@ -403,21 +403,10 @@
         if(!System.Test.isRunningTest()){
             // NFM606Controller.executeNotFuture('', contactIdList);
             if (contactIdList.size() > 0) {
-                // NFM606Controller.callout('', contactIdList);
-                 //娣诲姞future 鍒ゆ柇 add for pipl  sushanhu 20220317 start
-                 if (!(System.isFuture()||System.isBatch())) {
-                    NFM606Controller.callout('', contactIdList);
-                }
-               //娣诲姞future 鍒ゆ柇 add for pipl  sushanhu 20220317 end 
+                NFM606Controller.callout('', contactIdList);
             }
             if (interfaceUserUpsertContact.size() > 0) {
-                // NFM606Controller.executeNotFuture('', interfaceUserUpsertContact);
-                //娣诲姞future 鍒ゆ柇 add for pipl  sushanhu 20220316 start
-                if (!(System.isFuture()||System.isBatch())) {
-                    NFM606Controller.executeNotFuture('', interfaceUserUpsertContact);
-                }
-               //娣诲姞future 鍒ゆ柇 add for pipl  sushanhu 20220316 end 
-               
+                NFM606Controller.executeNotFuture('', interfaceUserUpsertContact);
             }
         } 
         

--
Gitblit v1.9.1