From 4af688d7b21327d65e5cd402d34723cbbe1c0e0f Mon Sep 17 00:00:00 2001 From: hurui <177768073@qq.com> Date: Wed, 11 Jan 2023 10:13:59 +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 --- .gitignore | 2 -- .../main/java/com/bweb/controller/HighCouponController.java | 1 + hai-service/src/main/java/com/hai/config/CommonSysConfig.java | 2 +- .../hai/order/service/impl/OrderCreateHandleServiceImpl.java | 2 +- .../java/com/hai/order/service/impl/OrderServiceImpl.java | 4 ++-- 5 files changed, 5 insertions(+), 6 deletions(-) diff --git a/.gitignore b/.gitignore index 8bc7d764..54de7de8 100644 --- a/.gitignore +++ b/.gitignore @@ -41,8 +41,6 @@ hai-user/log/* hai-user/hai-user.iml - - hai-service/hai-service.iml hai-bweb/src/main/java/com/bweb/controller/ApiIpAddressController.java hai-service/src/main/java/com/hai/dao/ApiIpAddressMapper.java diff --git a/hai-bweb/src/main/java/com/bweb/controller/HighCouponController.java b/hai-bweb/src/main/java/com/bweb/controller/HighCouponController.java index 2cb06dde..5c6e70aa 100644 --- a/hai-bweb/src/main/java/com/bweb/controller/HighCouponController.java +++ b/hai-bweb/src/main/java/com/bweb/controller/HighCouponController.java @@ -163,6 +163,7 @@ public class HighCouponController { highCoupon.setCreateTime(new Date()); highCoupon.setUpdateTime(new Date()); highCoupon.setStatus(1); // 状态:0.删除 1.编辑中 2.已上架 3.已下架 101.上架审批中 102.上架审批驳回 + highCoupon.setSalesCount(0); highCouponService.insertCoupon(highCoupon); return ResponseMsgUtil.success(highCoupon); diff --git a/hai-service/src/main/java/com/hai/config/CommonSysConfig.java b/hai-service/src/main/java/com/hai/config/CommonSysConfig.java index 67eba3af..7b78bf88 100644 --- a/hai-service/src/main/java/com/hai/config/CommonSysConfig.java +++ b/hai-service/src/main/java/com/hai/config/CommonSysConfig.java @@ -15,7 +15,7 @@ public class CommonSysConfig { // 加油站默认图片 private String gasDefaultOilStationImg; - // 重庆壳牌 + // 重庆中石油 private String ChongQingCnpcUrl; // 请求地址 private String ChongQingCnpcMerNo; // 商户号 private String ChongQingCnpcMerKey; // 商户秘钥 diff --git a/hai-service/src/main/java/com/hai/order/service/impl/OrderCreateHandleServiceImpl.java b/hai-service/src/main/java/com/hai/order/service/impl/OrderCreateHandleServiceImpl.java index 200b36c8..09936066 100644 --- a/hai-service/src/main/java/com/hai/order/service/impl/OrderCreateHandleServiceImpl.java +++ b/hai-service/src/main/java/com/hai/order/service/impl/OrderCreateHandleServiceImpl.java @@ -163,7 +163,7 @@ public class OrderCreateHandleServiceImpl implements OrderCreateHandleService { String childOrderNo = OrderUtil.generateChildOrderNo(); // 如果不是来源不是贵州中石化,需要校验库存 - if (!coupon.getCouponSource().equals(4) || !coupon.getCouponSource().equals(5)) { + if (!coupon.getCouponSource().equals(4) && !coupon.getCouponSource().equals(5)) { if (couponService.assignOrderStock(coupon.getId(), childOrderNo) == null) { throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "库存不足"); } diff --git a/hai-service/src/main/java/com/hai/order/service/impl/OrderServiceImpl.java b/hai-service/src/main/java/com/hai/order/service/impl/OrderServiceImpl.java index b5a8b376..947addcf 100644 --- a/hai-service/src/main/java/com/hai/order/service/impl/OrderServiceImpl.java +++ b/hai-service/src/main/java/com/hai/order/service/impl/OrderServiceImpl.java @@ -147,10 +147,10 @@ public class OrderServiceImpl implements OrderService { order.setCompanyId(createOrderModel.getCompanyId()); - /*********** 组装处理子订单 商品业务************/ List childOrderList = new ArrayList<>(); for (CreateOrderChildModel child : createOrderModel.getChildOrderList()) { + child.setOrderNo(order.getOrderNo()); child.setMemId(order.getMemId()); child.setMemName(order.getMemName()); child.setMemPhone(order.getMemPhone()); @@ -169,6 +169,7 @@ public class OrderServiceImpl implements OrderService { /*********** 话费 请求数据************/ object.put("rechargeContent" , child.getRechargeContent()); object.put("goodsId" , child.getGoodsId()); + // 购买卡券 if (child.getGoodsType().equals(OrderChildGoodsType.TYPE1.getNumber())) { order.setProductType(OrderProductType.PRODUCT_TYPE5.getNumber()); @@ -400,7 +401,6 @@ public class OrderServiceImpl implements OrderService { // 订单入库前处理 for (HighChildOrder childOrder : order.getHighChildOrderList()) { - childOrder.setOrderNo(order.getOrderNo()); childOrder.setSurplusRefundNum(childOrder.getSaleCount()); // 计算 子订单 在交易订单金额中的占比