|
|
@@ -124,7 +124,16 @@ public class RequestSTKServiceImpl implements RequestSTKService {
|
|
|
public CashFlowItemsVo getCashFlowItems(QueryCashFlowItemsDto dto) {
|
|
|
StkCommonDto stkCommonDto = new StkCommonDto();
|
|
|
stkCommonDto.setParam(dto);
|
|
|
- HttpResultResponse resultResponse = HuToolUtils.post(QUERY_URL+CASH_FLOW_ITEMS_REQUEST_CODE,stkCommonDto);
|
|
|
+
|
|
|
+ //头部请求参数
|
|
|
+ Map<String,String> headerMap = null;
|
|
|
+ try {
|
|
|
+ headerMap = getHeaderMap(dto);
|
|
|
+ } catch (Exception e) {
|
|
|
+ log.error("STK加密异常:{}",e.getMessage());
|
|
|
+ }
|
|
|
+
|
|
|
+ HttpResultResponse resultResponse = HuToolUtils.post(QUERY_URL+CASH_FLOW_ITEMS_REQUEST_CODE,stkCommonDto,headerMap);
|
|
|
log.info("深投控,现金流项目,返回结果数据{}",JSONObject.toJSONString(resultResponse));
|
|
|
if(!resultResponse.getSuccess()){
|
|
|
log.info("深投控,现金流项目数据异常:{}",resultResponse.getMessage());
|
|
|
@@ -136,7 +145,16 @@ public class RequestSTKServiceImpl implements RequestSTKService {
|
|
|
public AccountantProjectVo getAccountantProject(QueryAccountantProjectDto dto) {
|
|
|
StkCommonDto stkCommonDto = new StkCommonDto();
|
|
|
stkCommonDto.setParam(dto);
|
|
|
- HttpResultResponse resultResponse = HuToolUtils.post(QUERY_URL+ACCOUNTANT_PROJECT_REQUEST_CODE,stkCommonDto);
|
|
|
+
|
|
|
+ //头部请求参数
|
|
|
+ Map<String,String> headerMap = null;
|
|
|
+ try {
|
|
|
+ headerMap = getHeaderMap(dto);
|
|
|
+ } catch (Exception e) {
|
|
|
+ log.error("STK加密异常:{}",e.getMessage());
|
|
|
+ }
|
|
|
+
|
|
|
+ HttpResultResponse resultResponse = HuToolUtils.post(QUERY_URL+ACCOUNTANT_PROJECT_REQUEST_CODE,stkCommonDto,headerMap);
|
|
|
log.info("深投控,会计项目,返回结果数据{}",JSONObject.toJSONString(resultResponse));
|
|
|
if(!resultResponse.getSuccess()){
|
|
|
log.info("深投控,会计项目数据异常:{}",resultResponse.getMessage());
|
|
|
@@ -177,7 +195,7 @@ public class RequestSTKServiceImpl implements RequestSTKService {
|
|
|
/**
|
|
|
* POST请求头部参数封装
|
|
|
* */
|
|
|
- public Map<String,String> getHeaderMap(QueryTravellingMerchantDto dto) throws Exception {
|
|
|
+ public Map<String,String> getHeaderMap(Object dto) throws Exception {
|
|
|
|
|
|
//获取签名
|
|
|
String sign = getSign(dto);
|
|
|
@@ -197,7 +215,7 @@ public class RequestSTKServiceImpl implements RequestSTKService {
|
|
|
/**
|
|
|
* 获取深投控加密参数
|
|
|
* */
|
|
|
- public String getSign(QueryTravellingMerchantDto dto) throws Exception {
|
|
|
+ public String getSign(Object dto) throws Exception {
|
|
|
|
|
|
//时间戳
|
|
|
String timestamp = Long.toString(System.currentTimeMillis());
|