整单金额

This commit is contained in:
2025-10-27 10:59:16 +08:00
parent c943a77a27
commit 7fa139e6fb

View File

@@ -487,7 +487,8 @@ public class OrderInfoServiceImpl extends ServiceImpl<OrderInfoMapper, OrderInfo
BigDecimal discountAmount = newTotalAmount.multiply(discount);
discountAmount = discountAmount.setScale(2, RoundingMode.HALF_UP);
if (discountAmount.compareTo(param.getVipDiscountAmount()) != 0) {
throw new ValidateException("生成支付订单失败,未满足积分抵扣最低门槛");
log.info("会员整单折扣金额不正确:传递为:{},计算为:{}", param.getVipDiscountAmount(), discountAmount);
throw new ValidateException("生成支付订单失败,会员整单折扣金额不正确");
}
newTotalAmount = newTotalAmount.subtract(discountAmount);
}