diff --git a/jianshui-invoice/src/main/java/com/jianshui/invoice/utils/elephant/ElephantUtils.java b/jianshui-invoice/src/main/java/com/jianshui/invoice/utils/elephant/ElephantUtils.java index e31cc8a..9eb4b44 100644 --- a/jianshui-invoice/src/main/java/com/jianshui/invoice/utils/elephant/ElephantUtils.java +++ b/jianshui-invoice/src/main/java/com/jianshui/invoice/utils/elephant/ElephantUtils.java @@ -369,7 +369,7 @@ public class ElephantUtils { */ public static DxhyInterfaceResponse sendRequestWithoutTokenV6(String uri, String methodName, JSON data, Companyservice companyservice) throws UnsupportedEncodingException, NoSuchAlgorithmException, InvalidKeyException { - /*ICompanyservicePropService companyserviceProp = SpringUtils.getBean(ICompanyservicePropService.class); + ICompanyservicePropService companyserviceProp = SpringUtils.getBean(ICompanyservicePropService.class); CompanyserviceProp secretIdProp = companyserviceProp.selectPropByKey(companyservice.getCompanyid(), "elephant_secret_id"); if (secretIdProp == null) { throw new JianshuiServiceException("企业未配置属性,请联系管理员!"); @@ -386,20 +386,20 @@ public class ElephantUtils { String str = JSONUtil.toJsonStr(data); boolean isDevMode = CommonUtils.isDevMode(); // 主机名(京东云地址) - *//*String host = ElephantConstants.PROD_HOST_LOCAL_V6_JingDongYun; + /*String host = ElephantConstants.PROD_HOST_LOCAL_V6_JingDongYun; if (isDevMode) { host = ElephantConstants.DEV_HOST_LOCAL_V6_JingDongYun; - }*//* + }*/ String host = ELE_URL_v6; // 最终接口地址 - String url = host + uri;*/ + String url = host + uri; // 封装大象v6调用类 DxhyInterfaceRequest dxhyInterfaceRequest = new DxhyInterfaceRequest(); // 地址 - dxhyInterfaceRequest.setRequestUrl("http://192.168.3.169:10000/sims-api/invoice/api/v6/QueryInvoiceList"); + dxhyInterfaceRequest.setRequestUrl(url); // 请求方式 dxhyInterfaceRequest.setRequestType("POST"); // 超时时间(毫秒值) @@ -413,11 +413,11 @@ public class ElephantUtils { dxhyInterfaceRequest.setDataExchangeId(snowflakeIdStr); // appid - dxhyInterfaceRequest.setSecretId("JJVUXH8eYxXeQgeU5PrEPlPUsGCpF0Ln"); + dxhyInterfaceRequest.setSecretId(secretId); // appkey - dxhyInterfaceRequest.setSecretKey("UFvypbPSU51iwMdDoyPe8yWpt2PvxaHbgu3c"); + dxhyInterfaceRequest.setSecretKey(sercretKey); // 内容字段(content请求体) - dxhyInterfaceRequest.setContent(JSONUtil.toJsonStr(data)); + dxhyInterfaceRequest.setContent(str); // 不打包 dxhyInterfaceRequest.setZipCode("0"); // 不加密 @@ -434,7 +434,7 @@ public class ElephantUtils { } catch (Exception e) { - log.error("【销项】【大象接口】调用HttpsUtilV6.Exception, url=" + "url" + ",request=" + JSONUtil.toJsonStr(dxhyInterfaceRequest), e); + log.error("【销项】【大象接口】调用HttpsUtilV6.Exception, url=" + url + ",request=" + JSONUtil.toJsonStr(dxhyInterfaceRequest), e); } return dxhyInterfaceResponse;