Authored by caoyan

质检

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