From 3ba0123db48f8bab81ddf0913e1b95280ef545e8 Mon Sep 17 00:00:00 2001 From: Li Jun <buli@deloitte.com.cn> Date: 星期四, 31 三月 2022 17:56:53 +0800 Subject: [PATCH] Deploy0331 --- force-app/main/default/classes/PIHelper.cls | 12 +++++++----- 1 files changed, 7 insertions(+), 5 deletions(-) diff --git a/force-app/main/default/classes/PIHelper.cls b/force-app/main/default/classes/PIHelper.cls index b83a4a5..a6cc31f 100644 --- a/force-app/main/default/classes/PIHelper.cls +++ b/force-app/main/default/classes/PIHelper.cls @@ -58,8 +58,8 @@ insert traLog; } // confirm tx transaction - - public static void confirmTrans(String module,Integer isSuccess, String sfRecordId ,String transId ,String token,String transUrl,List<idList> idList){ + @future(callout =true) + public static void confirmTrans(String module,Integer isSuccess, String sfRecordId ,String transId ,String token,String transUrl,String idList){ Boolean result =false; Transaction_Log__c traLog = new Transaction_Log__c(); traLog.Module__c = 'Confirm Transaction '+module; @@ -82,9 +82,11 @@ TransactionRequestBody requestBody =new TransactionRequestBody(); requestBody.isSuccess=isSuccess; requestBody.sfRecordId=sfRecordId; - requestBody.idList=idList; + // requestBody.idList=idList; + requestBody.idList=(List < idList >)JSON.deserialize(idList,List < idList > .class); requestBody.txId =transId; request.setBody(JSON.serialize(requestBody)); + traLog.Request__c =JSON.serialize(requestBody); system.debug('request---'+request.tostring()); HttpResponse response = http.send(request); system.debug('confirm result--'+response.getBody()); @@ -127,10 +129,10 @@ traLog.TransId__c = transId; Integer MaxLogColumnLength = 131072; if (!String.isEmpty(sfRecordId)) { - traLog.SFRecordId__c=sfRecordId.substring(0, (sfRecordId.length() > MaxLogColumnLength ? MaxLogColumnLength : sfRecordId.length())); + traLog.Request__c=sfRecordId.substring(0, (sfRecordId.length() > MaxLogColumnLength ? MaxLogColumnLength : sfRecordId.length())); }else { String sfIds =JSON.serialize(idList); - traLog.SFRecordId__c=sfIds.substring(0, (sfIds.length() > MaxLogColumnLength ? MaxLogColumnLength : sfIds.length())); + traLog.Request__c=sfIds.substring(0, (sfIds.length() > MaxLogColumnLength ? MaxLogColumnLength : sfIds.length())); } if(isSuccess==0){ traLog.Status__c = 'fail'; -- Gitblit v1.9.1