Commit c57c4fa2 by 林永健

refactor(marketing): 优化营销活动服务中的产品激励计算逻辑

- 移除产品激励总额的计算和设置逻辑
- 简化产品折扣价格的计算流程
- 保持原有的折扣价格汇总功能不变
- 清理相关的流式操作代码结构
1 parent 862d009b
......@@ -356,12 +356,7 @@ public class MarketingActivityService {
.map(MarketingActivityProductItemReqDTO::getDiscountPrice)
.filter(Objects::nonNull)
.reduce(BigDecimal.ZERO, BigDecimal::add);
BigDecimal totalIncentive = items.stream()
.map(MarketingActivityProductItemReqDTO::getSalesIncentive)
.filter(Objects::nonNull)
.reduce(BigDecimal.ZERO, BigDecimal::add);
product.setDiscountPrice(totalDiscount);
product.setSalesIncentive(totalIncentive);
}
// ==================== 门店可用性校验 ====================
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!