Pārlūkot izejas kodu

fix(product): 修复产品仓库计数和状态显示问题

- 移除产品仓库计数查询中的多余条件限制
- 修正第三方平台产品默认显示状态为隐藏
- 调整产品上架状态默认值以匹配业务逻辑
shichen 3 mēneši atpakaļ
vecāks
revīzija
4b6343a745

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

@@ -657,7 +657,7 @@ class ProductRepository extends BaseRepository
657 657
         $result[] = [
658 658
             'type'  => 2,
659 659
             'name'  => '仓库中' . $name,
660
-            'count' => $this->dao->search($merId, $this->switchType(2, $merId, $productType))->whereNull('spu_id')->count()
660
+            'count' => $this->dao->search($merId, $this->switchType(2, $merId, $productType))->count()
661 661
         ];
662 662
         if ($merId) {
663 663
             $result[] = [

+ 2 - 2
app/services/ThirdParty/AlibabaAgent/ProductService.php

@@ -443,8 +443,8 @@ class ProductService extends AlibabaAgentBaseService
443 443
                 'store_name'     => $title,
444 444
                 'store_info'     => mb_substr($title, 0, 100),
445 445
                 'keyword'        => mb_substr($title, 0, 10),
446
-                'is_show'        => 1,
447
-                'status'         => 0,
446
+                'is_show'        => 0,
447
+                'status'         => 1,
448 448
                 'cate_id'        => 0,
449 449
                 'unit_name'      => $productInfo['unit'] ?? '件',
450 450
                 'price'          => $minPrice,