1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
| public void cancelOrderFee(Order order) { long startTime = System.currentTimeMillis(); String orderNo = order.getOrderNo(); try { Map<String, Object> paramMap = new HashMap<>(); paramMap.put("customerId", order.getBookingUserId()); paramMap.put("phone", order.getBookingUserPhone()); paramMap.put("orderNo", orderNo); LOGGER.info("退还指定司机费 orderNo:{} url:{} param:{}", orderNo, REFUND_CANCELORDER_FEE_URL, paramMap); String response = HttpUtil.getIntance().post(REFUND_CANCELORDER_FEE_URL, paramMap); LOGGER.info("退还指定司机费 orderNo:{} 接口响应:{}", orderNo, response); if (StringUtils.isNotBlank(response)) { ResponseResult responseResult = JsonUtils.fromJson(response, ResponseResult.class); if (ResponseResult.SUCCESS_CODE == responseResult.getCode()) { int data = (int) responseResult.getData(); if (0 == data) { LOGGER.info("退还指定司机费[成功] orderNo:{}", orderNo); } else { LOGGER.error("退还指定司机费[失败] orderNo:{} 失败原因:{}", orderNo, responseResult.getMsg()); } } else { LOGGER.error("退还指定司机费[失败] orderNo:{} 接口调用失败 失败原因:{}", orderNo, responseResult.getMsg()); } } else { LOGGER.error("退还指定司机费[失败] orderNo:{} 接口返回值错误 response:{}", orderNo, response); } } catch (Exception e) { LOGGER.error("退还指定司机费[异常] orderNo:{} 异常信息:", orderNo, e); } finally { LOGGER.info("退还指定司机费 orderNo:{} 接口耗时:{}ms", orderNo, System.currentTimeMillis() - startTime); } }
|