From 2a219875f33d50e0960480763fd0fd5c53a8bcb6 Mon Sep 17 00:00:00 2001 From: lqmac Date: Fri, 7 Jun 2024 23:31:49 +0800 Subject: [PATCH] 1 --- app/common/model/Goods.php | 4 ++-- app/store/controller/Goods.php | 5 ++++- config/module.php | 4 ++-- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/app/common/model/Goods.php b/app/common/model/Goods.php index f96cdf8d..a27997f7 100644 --- a/app/common/model/Goods.php +++ b/app/common/model/Goods.php @@ -504,8 +504,8 @@ class Goods extends BaseModel $filter[] = ['spec_type', '=', $params['spec_type']]; } //gj - if (isset($param['merchantId']) && $param['merchantId']) { - $filter[] = ['goods.merchant_id', '=', $param['merchantId']]; + if (isset($param['merchant_id']) && $param['merchant_id']) { + $filter[] = ['goods.merchant_id', '=', $param['merchant_id']]; } //是否店内 //if (isset($param['is_in_store']) && $param['is_in_store'] !== '') { diff --git a/app/store/controller/Goods.php b/app/store/controller/Goods.php index 8a0c13d0..d38e41f8 100644 --- a/app/store/controller/Goods.php +++ b/app/store/controller/Goods.php @@ -37,7 +37,10 @@ class Goods extends Controller $model = new GoodsModel; $params = $this->request->param(); //$params['channel'] = 'zy'; - $params['merchantId'] = $this->merchantId; + if (!isset($params['merchant_id'])) { + $params['merchant_id'] = $this->merchantId; + } + $list = $model->getList($params, (int)$this->request->param('pageSize', 15)); if ($list->isEmpty()) { return $this->renderSuccess(compact('list')); diff --git a/config/module.php b/config/module.php index 5fc2fdbc..17abbe46 100755 --- a/config/module.php +++ b/config/module.php @@ -26,12 +26,12 @@ return [ ], ] ], - 'merchant' => [ + '' => [ 'name' => '商户管理', 'required' => true, 'children' => [ 'merchant' => ['name' => '商户管理', 'enable' => true], - 'manage' => ['name' => '商户列表', 'enable' => true], + 'merchant-manage' => ['name' => '商户列表', 'enable' => true], ] ], 'goods' => [