提交代码

yy_dev
胡锐 2 years ago
parent a7a9492456
commit 3c18daeb08
  1. 4
      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());

Loading…
Cancel
Save