diff --git a/service/src/main/java/com/hfkj/service/impl/BsTradeOrderServiceImpl.java b/service/src/main/java/com/hfkj/service/impl/BsTradeOrderServiceImpl.java index 23e94ca..0b7ad99 100644 --- a/service/src/main/java/com/hfkj/service/impl/BsTradeOrderServiceImpl.java +++ b/service/src/main/java/com/hfkj/service/impl/BsTradeOrderServiceImpl.java @@ -119,7 +119,7 @@ public class BsTradeOrderServiceImpl implements BsTradeOrderService { tradeOrder.setStoreDiscountFinalCostPrice(storeDiscount.getFinalCostPrice()); if (storeDiscount.getDiscountType().equals(StoreDiscountActivityTypeEnum.type1.getNumber())) { // 未达到满减门槛 - if (userDiscount.getDiscountCondition().compareTo(tradeOrder.getTradeAmount()) >= 0) { + if (tradeOrder.getTradeAmount().compareTo(storeDiscount.getDiscountCondition()) < 0) { throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "满减优惠,未达到满减条件"); } else { tradeOrder.setStoreDiscountSatisfy(true); @@ -155,7 +155,7 @@ public class BsTradeOrderServiceImpl implements BsTradeOrderService { tradeOrder.setUserDiscountType(userDiscount.getDiscountType()); tradeOrder.setUserDiscountPrice(userDiscount.getDiscountPrice()); if (userDiscount.getDiscountType().equals(UserDiscountTypeEnum.type1.getNumber())) { - if (userDiscount.getDiscountCondition().compareTo(tradeOrder.getTradeAmount()) > 0) { + if (tradeOrder.getTradeAmount().compareTo(userDiscount.getDiscountCondition()) < 0) { throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "优惠券未达到满减门槛"); } tradeOrder.setUserDiscountActualPrice(userDiscount.getDiscountPrice());