V6接口地址变更

beta-enc
kk 2 years ago
parent f2bc86464d
commit a52e30f0b5
  1. 40
      jianshui-admin/src/main/java/com/jianshui/api/controller/http/invoice/v1/InvoiceController.java
  2. 4
      jianshui-invoice/src/main/java/com/jianshui/invoice/constant/elephant/ElephantConstantsV6.java

@ -415,7 +415,17 @@ public class InvoiceController {
IInvoiceRequestService invoiceRequestService = invoiceRequestFactory.getService(requestAdapterKey);
JSONObject decryptResult = invoiceRequestService.decrypt(request, companyservice, "deprecate");
HXResponse result = preHandleDecryptResult(decryptResult, "deprecate", companyservice);
// HXResponse result = preHandleDecryptResult(decryptResult, "deprecate", companyservice);
// 调用预处理
if (decryptResult == null) {
throw new JianshuiParamErrorException(ErrorCode.ERROR_PARAMS, companyservice, "invoice");
}
// 获得请求实例,并且进行扣费
String serviceKey = serviceManageService.getCompanyServiceSupplier("invoice", companyservice.getCompanyid());
serviceManageService.companyConsume("invoice", companyservice.getCompanyid());
IInvoiceApiService invoiceService = invoiceServiceFactory.getService(serviceKey);
decryptResult.put("service_supplier_key", serviceKey);
HXResponse result = invoiceService.deprecateInvoice(decryptResult, companyservice);
String responseAdapterKey = serviceManageService.getResponseAdapterKey("invoice", companyservice.getCompanyid());
IInvoiceResponseService invoiceResponseService = invoiceResponseFactory.getService(responseAdapterKey);
@ -445,7 +455,17 @@ public class InvoiceController {
IInvoiceRequestService invoiceRequestService = invoiceRequestFactory.getService(requestAdapterKey);
JSONObject decryptResult = invoiceRequestService.decrypt(request, companyservice, "deprecate_query");
HXResponse result = preHandleDecryptResult(decryptResult, "deprecate_query", companyservice);
// HXResponse result = preHandleDecryptResult(decryptResult, "deprecate_query", companyservice);
if (decryptResult == null) {
throw new JianshuiParamErrorException(ErrorCode.ERROR_PARAMS, companyservice, "invoice");
}
DeprecateQueryInvoiceDTO deprecateQueryInvoiceDTO = decryptResult.toJavaObject(DeprecateQueryInvoiceDTO.class);
// 获得请求实例,并且进行扣费
String serviceKey = serviceManageService.getCompanyServiceSupplier("invoice", companyservice.getCompanyid());
serviceManageService.companyConsume("invoice", companyservice.getCompanyid());
IInvoiceApiService invoiceService = invoiceServiceFactory.getService(serviceKey);
HXResponse result = invoiceService.deprecateQueryInvoice(deprecateQueryInvoiceDTO, companyservice);
String responseAdapterKey = serviceManageService.getResponseAdapterKey("invoice", companyservice.getCompanyid());
IInvoiceResponseService invoiceResponseService = invoiceResponseFactory.getService(responseAdapterKey);
@ -562,7 +582,21 @@ public class InvoiceController {
IInvoiceRequestService invoiceRequestService = invoiceRequestFactory.getService(requestAdapterKey);
JSONObject decryptResult = invoiceRequestService.decrypt(request, companyservice, "push");
HXResponse result = preHandleDecryptResult(decryptResult, "push", companyservice);
// HXResponse result = preHandleDecryptResult(decryptResult, "push", companyservice);
// 接口预处理
BillInfo billInfo = decryptResult.toJavaObject(BillInfo.class);
if (billInfo == null) {
throw new JianshuiParamErrorException(ErrorCode.ERROR_PARAMS, companyservice, "invoice");
}
billInfo.setSource("2");
// 获得请求实例,并且进行扣费
String serviceKey = serviceManageService.getCompanyServiceSupplier("invoice", companyservice.getCompanyid());
serviceManageService.companyConsume("invoice", companyservice.getCompanyid());
billInfo.setServiceSupplierKey(serviceKey);
IInvoiceApiService invoiceService = invoiceServiceFactory.getService(serviceKey);
HXResponse result = invoiceService.pushData(billInfo, companyservice);
String responseAdapterKey = serviceManageService.getResponseAdapterKey("invoice", companyservice.getCompanyid());
IInvoiceResponseService invoiceResponseService = invoiceResponseFactory.getService(responseAdapterKey);

@ -57,8 +57,8 @@ public class ElephantConstantsV6 {
public static String REDINFO_FIND_METHOD = "GetRedInvoiceApplication";
// 发票作废
public static String DEPRECATE_INVOICE = "order-api/order-api/V6/DeprecateInvoices";
public static String DEPRECATE_INVOICE_LOCALHOST = "/invoice/api/V6/DeprecateInvoices";
public static String DEPRECATE_INVOICE = "order-api/order-api/V5/DeprecateInvoices";
public static String DEPRECATE_INVOICE_LOCALHOST = "/invoice/api/V5/DeprecateInvoices";
public static String DEPRECATE_INVOICE_METHOD = "DeprecateInvoices";
// 发票作废结果查询

Loading…
Cancel
Save