From 9e6ddd35d073ace3883673c775e268ca029525a1 Mon Sep 17 00:00:00 2001 From: lqmac Date: Thu, 6 Jun 2024 22:41:45 +0800 Subject: [PATCH] 1 --- app/common/model/Goods.php | 9 ++------- app/store/controller/Goods.php | 3 +++ 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/app/common/model/Goods.php b/app/common/model/Goods.php index ebbf173b..31232b54 100644 --- a/app/common/model/Goods.php +++ b/app/common/model/Goods.php @@ -496,11 +496,6 @@ class Goods extends BaseModel $filter[] = ['is_new', '=', intval($param['is_new'])]; } - //gj - if (isset($param['merchantId']) && $param['merchantId']) { - $filter[] = ['merchant_id', '=', $param['merchantId']]; - } - if (!empty($param['paihang'])) { $filter[] = ['paihang', '>', 0]; $query->order('paihang asc'); @@ -579,8 +574,8 @@ class Goods extends BaseModel if (isset($param['is_has_detail']) && $param['is_has_detail'] !== '') { $filter[] = ['goods.is_has_detail', '=', $params['is_has_detail']]; } - if (isset($param['merchant_id']) && $param['merchant_id'] !== '') { - $filter[] = ['goods.merchant_id', '=', $params['merchant_id']]; + if (isset($param['merchantId']) && $param['merchantId'] !== '') { + $filter[] = ['goods.merchant_id', '=', $params['merchantId']]; } if (isset($param['is_jd_remove']) && $param['is_jd_remove'] !== '') { $filter[] = ['goods.is_jd_remove', '=', $params['is_jd_remove']]; diff --git a/app/store/controller/Goods.php b/app/store/controller/Goods.php index 02b6116e..8a0c13d0 100644 --- a/app/store/controller/Goods.php +++ b/app/store/controller/Goods.php @@ -227,6 +227,9 @@ class Goods extends Controller $params['store_id'] = $this->storeId; $perSize = 10000; $params['page'] = 1; + if ($this->merchantId) { + $params['merchantId'] = $this->merchantId; + } //$params['channels'] = ['zy']; // echo "
";
         // print_r($params);