From 38f646071ef8012e4229a6d5519a66c242c45718 Mon Sep 17 00:00:00 2001
From: 李彤 <litong@prec-tech.com>
Date: 星期四, 31 三月 2022 18:15:08 +0800
Subject: [PATCH] WLIG-CCT9UG关于市场多年保计提金调整
---
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