From a8a69eacd187dcb1eab0d415e83414f19b596fc6 Mon Sep 17 00:00:00 2001 From: yaooo <272523191@qq.com> Date: Thu, 31 Aug 2023 09:39:46 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E5=9C=B0=E5=8C=BA=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2=E5=BA=97=E9=93=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/common/repositories/system/merchant/MerchantRepository.php | 2 +- app/controller/api/store/merchant/Merchant.php | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/app/common/repositories/system/merchant/MerchantRepository.php b/app/common/repositories/system/merchant/MerchantRepository.php index baefe349..c7295efb 100644 --- a/app/common/repositories/system/merchant/MerchantRepository.php +++ b/app/common/repositories/system/merchant/MerchantRepository.php @@ -311,7 +311,7 @@ class MerchantRepository extends BaseRepository app()->make(UserVisitRepository::class)->searchMerchant($userInfo ? $userInfo['uid'] : 0, $where['keyword']); } $query = $this->dao->search($where)->with(['type_name']); - $count = $query->count(); + $count = $query->fetchSql()->count(); $status = systemConfig('mer_location'); /** @var MerchantTakeRepository $repository */ $repository = app()->make(MerchantTakeRepository::class); diff --git a/app/controller/api/store/merchant/Merchant.php b/app/controller/api/store/merchant/Merchant.php index 42653874..019eb28a 100644 --- a/app/controller/api/store/merchant/Merchant.php +++ b/app/controller/api/store/merchant/Merchant.php @@ -57,7 +57,8 @@ class Merchant extends BaseController [$page, $limit] = $this->getPage(); $where = $this->request->params(['keyword', 'order', 'is_best', 'location', 'category_id', 'type_id','is_trader', 'street_id', 'credit_buy']); if (empty($where['type_id'])) { - $where['type_id'] = [MerchantModel::TypeCloudWarehouse, MerchantModel::TypeStore, MerchantModel::TypeSupplyChain, MerchantModel::TypePlatform]; + //$where['type_id'] = [MerchantModel::TypeCloudWarehouse, MerchantModel::TypeStore, MerchantModel::TypeSupplyChain, MerchantModel::TypePlatform]; + $where['type_id'] = [MerchantModel::TypeTownSupplyChain, MerchantModel::TypeStore]; } return app('json')->success($this->repository->getList($where, $page, $limit, $this->userInfo)); }