|
|
@@ -112,5 +112,25 @@ public class BiHeServiceImpl implements BiHeService {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-
|
|
|
+ @Override
|
|
|
+ public void updateOrder(BiHeOrder order) {
|
|
|
+ order.setOpenId("be4a123f30894bf1bfba0c8962c0eed2");
|
|
|
+ order.setDetails(new ModelMap().addAttribute("key1", "orderId")
|
|
|
+ .addAttribute("key2", "lalalala")
|
|
|
+ .addAttribute("key3", "bababababa"));
|
|
|
+ order.setOrderId("orderId2");
|
|
|
+ order.setOrderStatus("b200000102");
|
|
|
+ order.setPayStatus("PAID");
|
|
|
+ String url = "https://opengw.bgycc.com/open/order/changeStatus";
|
|
|
+ String content;
|
|
|
+ try{
|
|
|
+ content = HttpUtil.doPost(url, JSON.toJSONString(order));
|
|
|
+ }catch (Exception e){
|
|
|
+ throw new VisibleError(e.getMessage());
|
|
|
+ }
|
|
|
+ BiHeResult<String> userRoot = JSON.parseObject(content, BiHeResult.class);
|
|
|
+ if (!BiHeResult.Code.OK.getCode().equals(userRoot.getCode())) {
|
|
|
+ throw new VisibleError(userRoot.getMsg());
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|