Authored by caoyan

质检

... ... @@ -432,6 +432,11 @@ public class BuyerOrderController {
return new ApiResponse.ApiResponseBuilder().code(400).message("订单号或付款方式不能为空").build();
}
JSONObject result = buyerOrderService.getSfWaybillCode(req);
if(null != result.getInteger("code") && result.getIntValue("code") != 200) {
return new ApiResponse.ApiResponseBuilder().code(result.getIntValue("code"))
.message(result.getString("message"))
.data(result.getJSONObject("data")).build();
}
return new ApiResponse.ApiResponseBuilder().code(200).message("查询成功").data(result).build();
}
... ...
... ... @@ -1578,6 +1578,7 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService {
JSONObject jsonReqObj = getStringHttpEntity(buyerOrder, sellerGoods, appraiseAddress.getAddress(), skup, req.getPayMethod());
HttpEntity<String> formEntity = new HttpEntity<>(jsonReqObj.toString(), getHttpHeaders());
LOGGER.info("getSfWaybillCode formEntity is {}", formEntity.toString());
ResponseEntity<JSONObject> responseResponseEntity = restTemplate.postForEntity(url, formEntity, JSONObject.class);
JSONObject body = responseResponseEntity.getBody();
LOGGER.info("erp result is {}", body);
... ...