Procházet zdrojové kódy

更新商品新增gong_market_price、gong_mer_price、plate_mer_profit字段值

family před 1 rokem
rodič
revize
5d4310fc46

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

@@ -428,6 +428,9 @@ class ProductRepository extends BaseRepository
428
                         "share_num"     => 0,
428
                         "share_num"     => 0,
429
                         "stock_num"     => 0,
429
                         "stock_num"     => 0,
430
                         "shares_num"    => 0,
430
                         "shares_num"    => 0,
431
+                        'gong_market_price' => $value['gong_market_price'] ?? 0.00,
432
+                        'gong_mer_price' => $value['gong_mer_price'] ?? 0.00,
433
+                        'plate_mer_profit' => $value['plate_mer_profit'] ?? 0.00,
431
                     ];
434
                     ];
432
                 } else {
435
                 } else {
433
                     $result['attrValue'][] = [
436
                     $result['attrValue'][] = [
@@ -452,6 +455,9 @@ class ProductRepository extends BaseRepository
452
                         "share_num"     => (isset($value['share_num']) && $value['share_num'] !== '') ? $value['share_num'] : 0,
455
                         "share_num"     => (isset($value['share_num']) && $value['share_num'] !== '') ? $value['share_num'] : 0,
453
                         "stock_num"     => (isset($value['stock_num']) && $value['stock_num'] !== '') ? $value['stock_num'] : 0,
456
                         "stock_num"     => (isset($value['stock_num']) && $value['stock_num'] !== '') ? $value['stock_num'] : 0,
454
                         "shares_num"    => (isset($value['shares_num']) && $value['shares_num'] !== '') ? $value['shares_num'] : 0,
457
                         "shares_num"    => (isset($value['shares_num']) && $value['shares_num'] !== '') ? $value['shares_num'] : 0,
458
+                        'gong_market_price' => $value['gong_market_price'] ?? 0.00,
459
+                        'gong_mer_price' => $value['gong_mer_price'] ?? 0.00,
460
+                        'plate_mer_profit' => $value['plate_mer_profit'] ?? 0.00,
455
                     ];
461
                     ];
456
                 }
462
                 }
457
                 if (!$pric) $pric = $value['price'];
463
                 if (!$pric) $pric = $value['price'];