|
@@ -108,7 +108,7 @@ ALTER TABLE product_orders ADD COLUMN sku_id BIGINT NULL COMMENT '下单SKU ID
|
|
|
|---|---|---|
|
|
|---|---|---|
|
|
|
| `CartService`(约 350 行) | `linkedProductId` 非空 → 替换为关联商品 | `comboItems` 非空 → **不替换商品**;显示父商品名/标签 + 组合摘要;`unitPrice = sku.price` |
|
|
| `CartService`(约 350 行) | `linkedProductId` 非空 → 替换为关联商品 | `comboItems` 非空 → **不替换商品**;显示父商品名/标签 + 组合摘要;`unitPrice = sku.price` |
|
|
|
| `ProductOrderService` 下单(约 765 行) | `linkedProductId` 非空 → 替换商品 + 价格 | `comboItems` 非空 → 不替换;`unitPrice = sku.price`;记录 `order.skuId`;校验各组成 SKU/商品库存(可选) |
|
|
| `ProductOrderService` 下单(约 765 行) | `linkedProductId` 非空 → 替换商品 + 价格 | `comboItems` 非空 → 不替换;`unitPrice = sku.price`;记录 `order.skuId`;校验各组成 SKU/商品库存(可选) |
|
|
|
-| `ProductOrderService.doHandlePaymentSuccess`(约 1035 行) | physical → 扣父商品;bundle → 穿透子商品 | 若 `order.skuId` 是组合 SKU:**跳过父商品扣减**,按 combo items 扣减 `childSkuId`(有值)或 `childProductId`,数量=`combo.quantity × order.quantity`,`recordOutbound(... "组合出库:" + orderNo)` |
|
|
|
|
|
|
|
+| `ProductOrderService.doHandlePaymentSuccess`(约 1035 行) | physical → 扣父商品;bundle → 穿透子商品 | 若 `order.skuId` 是组合 SKU:**跳过父商品扣减**,按 combo items 扣减 `childSkuId`(有值)或 `childProductId`,数量=`combo.quantity × 组合行数量`(组合行数量取自 order_items 中 sku_id=该组合SKU 的行 quantity 之和;无匹配行时回退订单总量 order.quantity),`recordOutbound(... "组合出库:" + orderNo)` |
|
|
|
| `ProductOrderService` 回补 3 处(约 1266/1714/1932 行) | 无条件 `increaseStock(order.productId, order.quantity)` | 若 `order.skuId` 是组合 SKU:按 combo items 反向回补各组成 SKU/商品(`increaseStock`),不补父商品 |
|
|
| `ProductOrderService` 回补 3 处(约 1266/1714/1932 行) | 无条件 `increaseStock(order.productId, order.quantity)` | 若 `order.skuId` 是组合 SKU:按 combo items 反向回补各组成 SKU/商品(`increaseStock`),不补父商品 |
|
|
|
| `ProductController`(约 151 行) | 返回 `linkedProductId` + `linked` 摘要 | 组合 SKU 返回 `comboItems` 摘要 + `isCombo = true` |
|
|
| `ProductController`(约 151 行) | 返回 `linkedProductId` + `linked` 摘要 | 组合 SKU 返回 `comboItems` 摘要 + `isCombo = true` |
|
|
|
|
|
|