From cb1ca9fc9deeb2f9a3614991868df77daeb9dd1b Mon Sep 17 00:00:00 2001 From: hurui <177768073@qq.com> Date: Tue, 9 Aug 2022 15:44:38 +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 --- .../main/java/com/cweb/controller/HighOrderController.java | 3 --- .../main/java/com/hai/service/impl/HighOrderServiceImpl.java | 5 +++-- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/hai-cweb/src/main/java/com/cweb/controller/HighOrderController.java b/hai-cweb/src/main/java/com/cweb/controller/HighOrderController.java index dbeb6f45..97ea9369 100644 --- a/hai-cweb/src/main/java/com/cweb/controller/HighOrderController.java +++ b/hai-cweb/src/main/java/com/cweb/controller/HighOrderController.java @@ -233,7 +233,6 @@ public class HighOrderController { log.error("HighOrderController --> addOrder() error!", "未找到用户"); throw ErrorHelp.genException(SysCode.System, ErrorCode.UN_MEMBER_ERROR, ""); } - highOrder.setPayType(2); // 第三方平台 childOrder.setGoodsActualPrice(childOrder.getGoodsPrice()); childOrder.setGoodsName(user.getName()); childOrder.setGoodsImg(user.getHeaderImg()); @@ -306,8 +305,6 @@ public class HighOrderController { log.error("HighOrderController --> addOrder() error!", "未找到门店信息"); throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未找到门店信息"); } - highOrder.setPayType(2); // 第三方平台 - if (highOrder.getIsTyAgent() != null && highOrder.getIsTyAgent().equals(true)) { // 查询加油站 HighTyAgentOilStation oilStation = tyAgentOilStationService.getDetailByOilStationId(childOrder.getGoodsId()); 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 a591e407..759db9e2 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 @@ -312,10 +312,11 @@ public class HighOrderServiceImpl implements HighOrderService { throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "支付的积分金额大于支付金额"); } + // 应付金额 减去 积分抵扣金额 = 支付金额 + highOrder.setPayPrice(highOrder.getPayablePrice().subtract(goldPrice)); + // 积分金额小于应付金额 if (goldPrice.compareTo(highOrder.getPayablePrice()) == -1) { - // 应付金额 减去 积分抵扣金额 = 支付金额 - highOrder.setPayPrice(highOrder.getPayablePrice().subtract(goldPrice)); updateOrderDetail(highOrder); // 扣除用户积分