提交 39552495 authored 作者: huyufan's avatar huyufan

同步运单风控

上级 91ce3a29
......@@ -114,8 +114,8 @@ public class OrderCancelController {
ThirdOrderChildBrokerParam param = transportSyncService.generateOrderChildSync(orderChild, orderGoods, settlementOwnerDetail, settlementDriverDetail);
log.info("=======================生成Param{}", JSONUtil.parse(param));
Result<HttpDTO> httpDTOResult = transportFeignService.orderChildSync(param);
String decrypt = ThirdComponent.decrypt(httpDTOResult.getData().getData());
HttpDTO httpDTOResult = transportFeignService.orderChildSync(param);
String decrypt = ThirdComponent.decrypt(httpDTOResult.getData());
OrderChildSyncDTO bean = JSONUtil.toBean(decrypt, OrderChildSyncDTO.class);
return Result.ok(bean);
}
......
......@@ -15,11 +15,8 @@ public class FeignInterceptor implements RequestInterceptor {
public void apply(RequestTemplate template){
// 通过template获取到请求体(已经被转成json)
String jsonBody = template.requestBody().asString();
// 构造通用的请求体
// String url = template.feignTarget().url() + template.url();
// Result<?> result = ThirdComponent.encryptPost(url, jsonBody, null);
// System.out.println(result);
try {
//调用网络货运请求需要加密处理
jsonBody = ThirdComponent.encrypt(jsonBody);
} catch (Exception e) {
throw new RuntimeException(e);
......@@ -29,6 +26,6 @@ public class FeignInterceptor implements RequestInterceptor {
@Bean
public Request.Options requestOptions() {
return new Request.Options(8000, 8000);
return new Request.Options(9000, 9000);
}
}
\ No newline at end of file
......@@ -23,7 +23,7 @@ public interface TransportFeignService {
* 运单同步
*/
@RequestMapping(value = "/transport-service/thirdParty/order/orderChildSync", method = RequestMethod.POST)
Result<HttpDTO> orderChildSync(@RequestBody ThirdOrderChildBrokerParam param);
HttpDTO orderChildSync(@RequestBody ThirdOrderChildBrokerParam param);
/**
* 运单支付运费同步
......
......@@ -75,8 +75,8 @@ public class SettlementServiceImpl implements SettlementService {
OrderGoods orderGoods = orderGoodsDao.getByOrderGoodsNo(orderChild.getOrderGoodsNo()).get();
//是否通过风控,调用网络货运
ThirdOrderChildBrokerParam param = transportSyncService.generateOrderChildSync(orderChild, orderGoods, settlementOwnerDetail, settlementDriverDetail);
Result<HttpDTO> httpDTOResult = transportFeignService.orderChildSync(param);
String decrypt = ThirdComponent.decrypt(httpDTOResult.getData().getData());
HttpDTO httpDTOResult = transportFeignService.orderChildSync(param);
String decrypt = ThirdComponent.decrypt(httpDTOResult.getData());
OrderChildSyncDTO bean = JSONUtil.toBean(decrypt, OrderChildSyncDTO.class);
if (bean.getCode() == 0) {
Integer status = bean.getData().getStatus();
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论