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); // 扣除用户积分