Li Jun
2022-03-24 4452a59757a30ff31fd05c1c6cc8c46725008827
force-app/main/default/classes/PIHelper.cls
@@ -113,6 +113,32 @@
        traLog.Interface_URL__c = traLog.Module__c;
        insert traLog;
    }
    //save qianlima log method add sushanhu 20220324
    // model 0 为文件 1为数据
    public static void insertConfirmTrans(String module,Integer isSuccess, String   sfRecordId ,String transId ,Integer model,String transUrl,List<idList> idList){
        Boolean result =false;
        Transaction_Log__c traLog = new Transaction_Log__c();
        if (model==0) {
            traLog.Module__c = 'ConfirmFileTransaction '+module;
        }else {
            traLog.Module__c = 'Confirm Transaction '+module;
        }
        traLog.Interface_URL__c = transUrl;
        traLog.TransId__c = transId;
        Integer MaxLogColumnLength = 131072;
        if (!String.isEmpty(sfRecordId)) {
           traLog.SFRecordId__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()));
        }
         if(isSuccess==0){
            traLog.Status__c = 'fail';
         } else {
            traLog.Status__c='success';
         }
        insert traLog;
    }
    public static PIIntegration getPIIntegrationInfo(String sobjectType){
        PIIntegration piIntegration = new PIIntegration();
        //查询url