Przeglądaj źródła

Merge branch 'dev'

xupuyuan 4 miesięcy temu
rodzic
commit
9296941900

+ 4 - 1
app/common/repositories/store/product/ProductRepository.php

@@ -465,6 +465,7 @@ class ProductRepository extends BaseRepository
465
                         "share_num"     => 0,
465
                         "share_num"     => 0,
466
                         "stock_num"     => 0,
466
                         "stock_num"     => 0,
467
                         "shares_num"    => 0,
467
                         "shares_num"    => 0,
468
+                        "is_usable"     => isset($value['is_usable']) ? (int)$value['is_usable'] : 0,
468
                         'gong_mer_profit' => $value['gong_mer_profit'] ?? 0.00,
469
                         'gong_mer_profit' => $value['gong_mer_profit'] ?? 0.00,
469
                         'gong_market_price' => $value['gong_market_price'] ?? 0.00,
470
                         'gong_market_price' => $value['gong_market_price'] ?? 0.00,
470
                         'plate_mer_profit' => $value['plate_mer_profit'] ?? 0.00,
471
                         'plate_mer_profit' => $value['plate_mer_profit'] ?? 0.00,
@@ -492,6 +493,7 @@ class ProductRepository extends BaseRepository
492
                         "share_num"     => (isset($value['share_num']) && $value['share_num'] !== '') ? $value['share_num'] : 0,
493
                         "share_num"     => (isset($value['share_num']) && $value['share_num'] !== '') ? $value['share_num'] : 0,
493
                         "stock_num"     => (isset($value['stock_num']) && $value['stock_num'] !== '') ? $value['stock_num'] : 0,
494
                         "stock_num"     => (isset($value['stock_num']) && $value['stock_num'] !== '') ? $value['stock_num'] : 0,
494
                         "shares_num"    => (isset($value['shares_num']) && $value['shares_num'] !== '') ? $value['shares_num'] : 0,
495
                         "shares_num"    => (isset($value['shares_num']) && $value['shares_num'] !== '') ? $value['shares_num'] : 0,
496
+                        "is_usable"     => isset($value['is_usable']) ? (int)$value['is_usable'] : 0,
495
                         'gong_mer_profit' => $value['gong_mer_profit'] ?? 0.00,
497
                         'gong_mer_profit' => $value['gong_mer_profit'] ?? 0.00,
496
                         'gong_market_price' => $value['gong_market_price'] ?? 0.00,
498
                         'gong_market_price' => $value['gong_market_price'] ?? 0.00,
497
                         'plate_mer_profit' => $value['plate_mer_profit'] ?? 0.00,
499
                         'plate_mer_profit' => $value['plate_mer_profit'] ?? 0.00,
@@ -1227,7 +1229,8 @@ class ProductRepository extends BaseRepository
1227
                 'volume'   => $value['volume'],
1229
                 'volume'   => $value['volume'],
1228
                 'ot_price' => set_price_rtrim($value['ot_price']),
1230
                 'ot_price' => set_price_rtrim($value['ot_price']),
1229
                 'unique'   => $value['unique'],
1231
                 'unique'   => $value['unique'],
1230
-                'dacang'   => $value['dacang_price'] ? set_price_rtrim($value['dacang_price']) : 'null'
1232
+                'dacang'   => $value['dacang_price'] ? set_price_rtrim($value['dacang_price']) : 'null',
1233
+                'is_usable' => $value['is_usable'],
1231
             ];
1234
             ];
1232
             if ($productType) {
1235
             if ($productType) {
1233
                 $sku[$value['sku']]['stock'] = $value['stock'] - $make->seckillSkuOrderCounut($value['unique']); //获取sku的销量
1236
                 $sku[$value['sku']]['stock'] = $value['stock'] - $make->seckillSkuOrderCounut($value['unique']); //获取sku的销量