master
wangxinglong 2022-08-08 18:11:24 +08:00
parent c22ceaa5f9
commit 99675758bc
1 changed files with 2 additions and 2 deletions

View File

@ -78,8 +78,8 @@ class SpuRepository extends Repository
$whereMap[] = ['saleable', '=', $params['saleable']]; $whereMap[] = ['saleable', '=', $params['saleable']];
} }
if (isset($params['keyword']) && !empty($params['keyword'])) { if (isset($params['keyword']) && !empty(trim($params['keyword']))) {
$whereMap[] = ['name|subtitle', 'like', '%'.$params['keyword'].'%']; $whereMap[] = ['name|subtitle', 'like', '%'.trim($params['keyword']).'%'];
} }
if (isset($params['spu_type']) && !empty($params['spu_type'])) { if (isset($params['spu_type']) && !empty($params['spu_type'])) {