From a86527c82e37bbd48d1ee1d9edd8194c0f0e7947 Mon Sep 17 00:00:00 2001 From: yaooo <272523191@qq.com> Date: Tue, 26 Sep 2023 17:08:05 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E6=9F=A5=E8=AF=A2=E9=95=87?= =?UTF-8?q?=E7=BA=A7=E4=BE=9B=E5=BA=94=E9=93=BE=E5=95=86=E5=93=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controller/api/store/product/CloudWarehouse.php | 4 ++-- app/controller/api/store/product/StoreSpu.php | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/app/controller/api/store/product/CloudWarehouse.php b/app/controller/api/store/product/CloudWarehouse.php index 2e7bef6f..4db81e40 100644 --- a/app/controller/api/store/product/CloudWarehouse.php +++ b/app/controller/api/store/product/CloudWarehouse.php @@ -61,10 +61,10 @@ class CloudWarehouse extends BaseController if (empty($merchantIds)) { return app('json')->success(['count' => 0, 'list' => []]); } - $typeCloudWarehouseId = Db::name('MerchantType')->where('type_code', Merchant::TypeCode['TypeCloudWarehouse'])->value('mer_type_id'); + $typeTownSupplyChainId = Db::name('MerchantType')->where('type_code', Merchant::TypeCode['TypeTownSupplyChain'])->value('mer_type_id'); $entryWhere = [ 'street_id' => $params['street_code'], - 'type_id' => $typeCloudWarehouseId, + 'type_id' => $typeTownSupplyChainId, 'category_id' => $params['category_id'], 'status' => 1, 'is_del' => 0, diff --git a/app/controller/api/store/product/StoreSpu.php b/app/controller/api/store/product/StoreSpu.php index 39f4ab72..555cd165 100644 --- a/app/controller/api/store/product/StoreSpu.php +++ b/app/controller/api/store/product/StoreSpu.php @@ -143,13 +143,13 @@ class StoreSpu extends BaseController ]); if ($where['action']) unset($where['product_type']); $currentMerchant = Db::name('merchant')->where('mer_id',$id)->field('category_id,street_id')->find(); - $typeCloudWarehouseId = Db::name('MerchantType')->where('type_code', Merchant::TypeCode['TypeCloudWarehouse'])->value('mer_type_id'); + $typeTownSupplyChainId = Db::name('MerchantType')->where('type_code', Merchant::TypeCode['TypeTownSupplyChain'])->value('mer_type_id'); $mer_id = Db::name('merchant') ->where('street_id',$currentMerchant['street_id']) ->where('mer_state',1) ->where('status',1) ->where('category_id',$currentMerchant['category_id']) - ->where('type_id', $typeCloudWarehouseId) + ->where('type_id', $typeTownSupplyChainId) ->value('mer_id'); if (!$mer_id) { return app('json')->success(['count'=>0,'list'=>[]]); @@ -171,7 +171,7 @@ class StoreSpu extends BaseController { [$page, $limit] = $this->getPage(); $where = $this->request->params(['common','mer_id']); - $typeStoreId = Db::name('MerchantType')->where('type_code', Merchant::TypeCode['TypeStore'])->value('mer_type_id'); + $typeTownSupplyChainId = Db::name('MerchantType')->where('type_code', Merchant::TypeCode['TypeTownSupplyChain'])->value('mer_type_id'); $where['is_gift_bag'] = 0; //1:星级 //2:用户收藏 @@ -197,7 +197,7 @@ class StoreSpu extends BaseController } $where['product_type'] = 0; $where['is_stock'] = 1; - $where['mer_ids'] = Merchant::getInstance()->where('type_id', $typeStoreId) + $where['mer_ids'] = Merchant::getInstance()->where('type_id', $typeTownSupplyChainId) ->where(['status' => 1, 'mer_state' => 1, 'is_del' => 0])->column('mer_id'); $data = $this->repository->getApiSearch($where, $page, $limit, $this->userInfo); return app('json')->success($data);