|
|
|
@ -106,6 +106,8 @@ public class InterfaceController extends AbstractController { |
|
|
|
|
private IReceiptOutService iReceiptOutService; |
|
|
|
|
@Resource |
|
|
|
|
private VoucherRecordService voucherRecordService; |
|
|
|
|
@Value("${erp.ipUrl}") |
|
|
|
|
private String ipUrl; |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* |
|
|
|
@ -149,7 +151,7 @@ public class InterfaceController extends AbstractController { |
|
|
|
|
/** |
|
|
|
|
* 鉴权 |
|
|
|
|
*/ |
|
|
|
|
result = authV5(request, dxhyInterfaceRequest,secretKey); |
|
|
|
|
result = authV5( version+"/"+interfaceName, request, dxhyInterfaceRequest,secretKey); |
|
|
|
|
long end1 = System.currentTimeMillis(); |
|
|
|
|
log.debug("{}鉴权耗时{}毫秒", LOGGER_MSG, end1 - begin1); |
|
|
|
|
if (!ConfigurerInfo.SUCCSSCODE.equals(result.getCode())) { |
|
|
|
@ -294,14 +296,15 @@ public class InterfaceController extends AbstractController { |
|
|
|
|
return result; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private CheckResult authV5(HttpServletRequest request, DxhyInterfaceRequest dxhyInterfaceRequest,String secretKey) { |
|
|
|
|
private CheckResult authV5(String url,HttpServletRequest request, DxhyInterfaceRequest dxhyInterfaceRequest,String secretKey) { |
|
|
|
|
CheckResult checkResult = new CheckResult(RespStatusEnum.AUTHFAIL); |
|
|
|
|
String reqUrl = request.getRequestURL().toString(); |
|
|
|
|
if (reqUrl.contains(ConfigureConstant.STRING_WH)) { |
|
|
|
|
reqUrl = reqUrl.substring(ConfigureConstant.INT_0, reqUrl.indexOf(ConfigureConstant.STRING_WH)); |
|
|
|
|
} |
|
|
|
|
log.debug("{}请求路径:{}", LOGGER_MSG, reqUrl); |
|
|
|
|
//获取鉴权URL
|
|
|
|
|
String signUrl = getAuthUrl(reqUrl, request.getMethod()); |
|
|
|
|
String signUrl = ipUrl+url+"?"; |
|
|
|
|
TreeMap<String, String> sortMap = new TreeMap<>(); |
|
|
|
|
sortMap.put(ConfigurerInfo.SECRETID, dxhyInterfaceRequest.getSecretId()); |
|
|
|
|
sortMap.put(ConfigurerInfo.DATA_EXCHANGE_ID, dxhyInterfaceRequest.getDataExchangeId()); |
|
|
|
|