From deedafe21fdf1a3e52047aa63e9c3e608c1f723a Mon Sep 17 00:00:00 2001 From: yaooo <272523191@qq.com> Date: Wed, 27 Sep 2023 13:53:30 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E6=9F=A5=E8=AF=A2=E5=95=86?= =?UTF-8?q?=E5=93=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/common/dao/store/product/ProductDao.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/common/dao/store/product/ProductDao.php b/app/common/dao/store/product/ProductDao.php index 7d4b2fbf..4e2b347d 100644 --- a/app/common/dao/store/product/ProductDao.php +++ b/app/common/dao/store/product/ProductDao.php @@ -117,6 +117,7 @@ class ProductDao extends BaseDao $whereArr[$key] = $item; } } + // halt($where); $query = isset($where['soft']) ? model::onlyTrashed()->alias('Product') : model::alias('Product'); if (isset($where['is_trader']) && $where['is_trader'] !== '') { $query->hasWhere('merchant', function ($query) use ($where) { @@ -152,7 +153,7 @@ class ProductDao extends BaseDao } }) ->when(isset($where['keyword']) && $where['keyword'] !== '', function ($query) use ($where) { - $query->whereLike('Product.keyword', "%{$where['keyword']}%"); + $query->whereLike('Product.store_name', "%{$where['keyword']}%"); }) ->when(isset($where['mer_labels']) && $where['mer_labels'] !== '', function ($query) use ($where) { $query->whereLike('U.mer_labels', "%,{$where['mer_labels']},%");