diff --git a/service/src/main/java/com/hfkj/service/order/impl/BsOrderServiceImpl.java b/service/src/main/java/com/hfkj/service/order/impl/BsOrderServiceImpl.java index 2cbba4d..57e7a5f 100644 --- a/service/src/main/java/com/hfkj/service/order/impl/BsOrderServiceImpl.java +++ b/service/src/main/java/com/hfkj/service/order/impl/BsOrderServiceImpl.java @@ -287,7 +287,7 @@ public class BsOrderServiceImpl implements BsOrderService { } else if (3 == discount.getType()) { deduction.setCouponDiscountActualPrice( order.getTotalPrice() - .multiply(discount.getPrice().divide(new BigDecimal("100"))) + .multiply(discount.getPercentage().divide(new BigDecimal("100"))) .setScale(2, BigDecimal.ROUND_DOWN) ); } else { @@ -298,12 +298,10 @@ public class BsOrderServiceImpl implements BsOrderService { .add(new BigDecimal(deduction.getIntegralDiscountPrice().toString()).divide(new BigDecimal("100")))); orderDeductionService.editData(deduction); } catch (Exception e) { - throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "积分交易异常"); + throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "优惠券使用异常"); } finally { redisTemplate.delete(key); } - - return deduction; }