'提交代码'

dev-discount
胡锐 3 years ago
parent 96ec8e09ce
commit 3b214e211b
  1. 12
      hai-cweb/src/main/java/com/cweb/controller/HighTestController.java
  2. 5
      hai-service/src/main/java/com/hai/service/impl/HighOrderServiceImpl.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);

@ -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) {

Loading…
Cancel
Save