From 3b214e211be42a58bceef08f5b4fdb8a38d70def Mon Sep 17 00:00:00 2001 From: hurui <177768073@qq.com> Date: Mon, 6 Sep 2021 16:14:19 +0800 Subject: [PATCH] =?UTF-8?q?'=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/cweb/controller/HighTestController.java | 12 +++++++++++- .../com/hai/service/impl/HighOrderServiceImpl.java | 5 +++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/hai-cweb/src/main/java/com/cweb/controller/HighTestController.java b/hai-cweb/src/main/java/com/cweb/controller/HighTestController.java index d5f343ff..a9807b4f 100644 --- a/hai-cweb/src/main/java/com/cweb/controller/HighTestController.java +++ b/hai-cweb/src/main/java/com/cweb/controller/HighTestController.java @@ -2,6 +2,7 @@ package com.cweb.controller; import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONObject; +import com.cweb.config.SysConst; import com.hai.common.exception.ErrorCode; import com.hai.common.exception.ErrorHelp; import com.hai.common.exception.SysCode; @@ -223,7 +224,16 @@ public class HighTestController { public ResponseData test3() { try { // return ResponseMsgUtil.success(HuiLianTongUnionCardConfig.resolveResponse("T3xbPEKEXV9+CbBw8D1B+N2jk8xwa55s0Bde48c49YDMmj1rv5nOrkawWt8fskSihNw0wugKUT1x\\nWjHhIN8af7NylRVfhJvbeja2Zjjxnwk3FEKgyvIvJnk3QgiY4aghqQcGKxDOlAxT/kjrkDd2ESu1\\nIWkpi+0HGnG3rKSL6+a1Nu7aW+rPHwXUOmHSgWFZFb9HhlfKI/jml3GhMZBWsZFirayyMMi8UKrd\\nYN7ANPEB/6uV9iVtpLF5Kz8M2+GpI0EqRhPFAH2u3Q/RSgW8ei2ZbOY9NnbkdwuOjU93wgJxdY1Y\\n93hvLYNe1i9QkSM1")); - return ResponseMsgUtil.success(HuiLianTongUnionCardConfig.queryCardInfo("HF2021061600273071609").getString("data")); + // 获取token + JSONObject tokenObject = HuiLianTongConfig.getToken(); + if (!tokenObject.getString("result").equals("success")) { + log.error("HighCouponController -> insertCoupon() error!","获取token失败"); + throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "获取token失败"); + } + // 推送给高速 + JSONObject returnParam = HuiLianTongConfig.couJointDist(tokenObject.getString("data"), "20JY000251", 4, "15932678659", "HF"+new Date().getTime()); + + return ResponseMsgUtil.success(returnParam); } catch (Exception e) { log.error("HighOrderController --> getOrderById() error!", e); return ResponseMsgUtil.exception(e); diff --git a/hai-service/src/main/java/com/hai/service/impl/HighOrderServiceImpl.java b/hai-service/src/main/java/com/hai/service/impl/HighOrderServiceImpl.java index 38baf321..a17a2daa 100644 --- a/hai-service/src/main/java/com/hai/service/impl/HighOrderServiceImpl.java +++ b/hai-service/src/main/java/com/hai/service/impl/HighOrderServiceImpl.java @@ -305,6 +305,10 @@ public class HighOrderServiceImpl implements HighOrderService { goodsDesc = "积分充值"+order.getPayPrice()+"元"; tranDesc = "嗨森逛积分充值"+order.getPayPrice()+"元"; + } else if (order.getHighChildOrderList().get(0).getGoodsType() == 3) { + goodsDesc = "加油站加"+order.getPayPrice()+"元油"; + tranDesc = "【"+order.getHighChildOrderList().get(0).getGoodsName()+"】加油"+order.getPayPrice()+"元"; + } else { throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "暂时无法支付,请使用其他支付方式"); } @@ -333,6 +337,7 @@ public class HighOrderServiceImpl implements HighOrderService { order.setPayType(4); // 支付方式: 1:支付宝 2:微信 3:金币 4:汇联通支工会卡 order.setOrderStatus(2); // 订单状态:1 待支付 2 已支付 3.已完成 4. 已退款 5.已取消 + for (HighChildOrder highChildOrder : order.getHighChildOrderList()) { // 商品类型 商品类型 1:卡卷 2:金币充值 if (highChildOrder.getGoodsType() == 1) {