From f4b39974916e0db7c1b68b0145e8fc0569e93c50 Mon Sep 17 00:00:00 2001 From: bruce <1272542526@qq.com> Date: Mon, 11 Mar 2024 21:23:32 +0800 Subject: [PATCH] update --- app/common/model/Goods.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/common/model/Goods.php b/app/common/model/Goods.php index c58317cf..640e8931 100644 --- a/app/common/model/Goods.php +++ b/app/common/model/Goods.php @@ -344,8 +344,8 @@ class Goods extends BaseModel } // 商品名称 - if(count($params['keywords']) > 0 ) { - $filter[] = ['goods_name', 'like', "%{$params['keywords']}%"]; + foreach ($params['keywords'] as $val){ + $filter[] = ['goods_name', 'like', "%{$val}%"]; } // 商品名称 !empty($params['goodsName']) && $filter[] = ['goods_name', 'like', "%{$params['goodsName']}%"];