Browse Source

feat(product): 添加SKU和规格ID字段到产品价格数据

- 在产品价格数组中新增sku_id字段
- 在产品价格数组中新增spec_id字段
- 确保新字段具有默认空值保护
shichen 3 months ago
parent
commit
50cbcae745
1 changed files with 2 additions and 0 deletions
  1. 2 0
      app/common/repositories/store/product/ProductRepository.php

+ 2 - 0
app/common/repositories/store/product/ProductRepository.php

@@ -503,6 +503,8 @@ class ProductRepository extends BaseRepository
503 503
                         'gong_mer_profit' => $value['gong_mer_profit'] ?? 0.00,
504 504
                         'gong_market_price' => $value['gong_market_price'] ?? 0.00,
505 505
                         'plate_mer_profit' => $value['plate_mer_profit'] ?? 0.00,
506
+                        'sku_id' => $value['sku_id'] ?? null,
507
+                        'spec_id' => $value['spec_id'] ?? null,
506 508
                     ];
507 509
                 }
508 510
                 if (!$pric) $pric = $value['price'];