refactor(pricing): 移除冗余的产品属性键缓存逻辑

- 删除了产品属性键的缓存处理逻辑
- 简化了价格计算服务中的商品处理流程
- 移除了不再使用的产品属性键设置方法调用
This commit is contained in:
2025-12-19 09:21:23 +08:00
parent 956ace77a8
commit 677893272a

View File

@@ -196,13 +196,6 @@ public class PriceCalculationServiceImpl implements IPriceCalculationService {
BigDecimal subtotal = priceInfo.getActualPrice().multiply(BigDecimal.valueOf(product.getPurchaseCount())); BigDecimal subtotal = priceInfo.getActualPrice().multiply(BigDecimal.valueOf(product.getPurchaseCount()));
BigDecimal originalSubtotal = priceInfo.getOriginalPrice().multiply(BigDecimal.valueOf(product.getPurchaseCount())); BigDecimal originalSubtotal = priceInfo.getOriginalPrice().multiply(BigDecimal.valueOf(product.getPurchaseCount()));
List<String> attributeKeys = attributeKeysCache.get(productTypeCode);
if (attributeKeys == null) {
attributeKeys = buildProductAttributeKeys(capability);
attributeKeysCache.put(productTypeCode, attributeKeys);
}
product.setAttributeKeys(attributeKeys);
product.setSubtotal(subtotal); product.setSubtotal(subtotal);
totalAmount = totalAmount.add(subtotal); totalAmount = totalAmount.add(subtotal);