cbs8接口
This commit is contained in:
parent
905df77c02
commit
351ed98ab4
|
@ -7,9 +7,7 @@ import cn.hutool.http.HttpRequest;
|
|||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.alibaba.fastjson.serializer.SerializerFeature;
|
||||
import com.hzya.frame.cbs8.dto.req.ElecRequestDTO;
|
||||
import com.hzya.frame.cbs8.dto.req.PayResultRequestDTO;
|
||||
import com.hzya.frame.cbs8.dto.req.TransactionDetailReqDTO;
|
||||
import com.hzya.frame.cbs8.dto.req.*;
|
||||
import com.hzya.frame.cbs8.dto.res.*;
|
||||
import com.hzya.frame.cbs8.service.ICbs8Service;
|
||||
import com.hzya.frame.cbs8.util.CBSUtil;
|
||||
|
@ -164,4 +162,45 @@ public class Cbs8ServiceImpl implements ICbs8Service {
|
|||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 代发代扣 支付申请
|
||||
* @param paymentApplySubmitReqDTO
|
||||
* @param paymentApplyAgentList
|
||||
*/
|
||||
@Override
|
||||
public PayResponseDTO agentPayApply(PaymentApplySubmitReqDTO paymentApplySubmitReqDTO, List<PaymentApplyAgentDTO> paymentApplyAgentList) {
|
||||
AgentPayRequestDTO param = new AgentPayRequestDTO();
|
||||
param.setPaymentApplySubmitReqDTO(paymentApplySubmitReqDTO);
|
||||
param.setPaymentApplyAgentDTO(paymentApplyAgentList);
|
||||
String params = JSON.toJSONString(param);
|
||||
Map<String, String> headerMap = MapBuilder.<String, String>create(true)
|
||||
.put("apiCode", "8000260003")
|
||||
.put("publicKey","ZJYA1vBeY1ai53iNmbAEsw6DImjkXGBkdMailxcBdliFC85Ce7eDIk+3zDUT+v578prj")
|
||||
.put("secretKey","7Gp6OjHrIaQ6R3tXGPrI4morjQyWL+qu4JJschQnkBRtv26VDgGFVYKOy5kMZfd/j3JzOP8MtA1LSGvL+2BWG8c/o7DKi92S4mr3zcGearA=")
|
||||
.put("appId","800026")
|
||||
.build();
|
||||
String result = HttpRequest.post("http://127.0.0.1:9999/kangarooDataCenterV3/entranceController/externalCallInterface").addHeaders(headerMap).body(params).timeout(60000).execute().body();
|
||||
if (StrUtil.isNotEmpty(result)){
|
||||
CbsResponseDTO cbsResponseDTO = JSONObject.parseObject(result, CbsResponseDTO.class);
|
||||
List<JSONObject> dataList = cbsResponseDTO.getData();
|
||||
if (CollectionUtils.isNotEmpty(dataList)){
|
||||
JSONObject o = dataList.get(0);
|
||||
PayResponseDTO payResponseDTO = JSON.toJavaObject(o, PayResponseDTO.class);
|
||||
return payResponseDTO;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 代发代扣 详情查询
|
||||
*
|
||||
* @param agentPayResultRequestDTO
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public AgentPayResultResDTO agentPayResult(AgentPayResultRequestDTO agentPayResultRequestDTO) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue