更新地区查询店铺

This commit is contained in:
yaooo 2023-08-31 09:39:46 +08:00
parent 0055a00ea8
commit a8a69eacd1
2 changed files with 3 additions and 2 deletions

View File

@ -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);

View File

@ -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));
}