配置中心

This commit is contained in:
2025-10-27 16:51:20 +08:00
parent e6ad8baeeb
commit 49755e6354
10 changed files with 277 additions and 29 deletions

View File

@@ -855,7 +855,7 @@ public class OrderInfoServiceImpl extends ServiceImpl<OrderInfoMapper, OrderInfo
throw new ValidateException("生成支付订单失败,商品:" + detail.getProductName() + " 抵扣券与限时折扣不可共用。");
}
detail.setHalfPriceCouponNum(BigDecimal.ONE);
BigDecimal halfPrice = detail.getUnitPrice().divide(new BigDecimal("2")).setScale(2, RoundingMode.FLOOR);
BigDecimal halfPrice = detail.getUnitPrice().divide(new BigDecimal("2"), 2, RoundingMode.FLOOR);
detail.setDiscountAmount(detail.getDiscountAmount().add(halfPrice));
detail.setPayAmount(detail.getPayAmount().subtract(halfPrice));
oneGiftAmount.setPrice(halfPrice);
@@ -920,6 +920,7 @@ public class OrderInfoServiceImpl extends ServiceImpl<OrderInfoMapper, OrderInfo
}
originalPrice = originalPrice.add(orderDetail.getPayAmount());
}
log.info("满减活动门槛金额计算为:{}", originalPrice);
for (MkDiscountThreshold threshold : discountAct.getThresholds()) {
if (originalPrice.compareTo(threshold.getFullAmount()) >= 0) {
return threshold.getDiscountAmount();