|
|
|
@ -313,7 +313,7 @@ class Goods extends BaseModel |
|
|
|
|
'goodsName' => null, // 商品名称 |
|
|
|
|
'goodsNo' => null, // 商品编码 |
|
|
|
|
'status' => 0, // 商品状态(0全部 10上架 20下架) |
|
|
|
|
'keywords' => [] |
|
|
|
|
'keywords' => '' |
|
|
|
|
]); |
|
|
|
|
|
|
|
|
|
// 实例化新查询对象 |
|
|
|
@ -346,11 +346,9 @@ class Goods extends BaseModel |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
// 商品名称 |
|
|
|
|
if (is_array($params['keywords'])) { |
|
|
|
|
foreach ($params['keywords'] as $val) { |
|
|
|
|
foreach (explode(",", $params['keywords']?? '') as $val) { |
|
|
|
|
$filter[] = ['goods_name', 'like', "%{$val}%"]; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// 商品名称 |
|
|
|
|
!empty($params['goodsName']) && $filter[] = ['goods_name', 'like', "%{$params['goodsName']}%"]; |
|
|
|
|